Here you can find the source of sum(float[][] a1, float[][] a2)
Parameter | Description |
---|---|
a1 | first array |
a2 | second array |
public static void sum(float[][] a1, float[][] a2)
//package com.java2s; public class Main { /**//from w w w . j a v a2 s . c o m * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(float[][] a1, float[][] a2) { for (int j = 0; j < a1.length; j++) { sum(a1[j], a2[j]); } } /** * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(float[] a1, float[] a2) { for (int j = 0; j < a1.length; j++) { a1[j] += a2[j]; } } /** * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(int[][] a1, int[][] a2) { for (int j = 0; j < a1.length; j++) { sum(a1[j], a2[j]); } } /** * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(int[] a1, int[] a2) { for (int j = 0; j < a1.length; j++) { a1[j] += a2[j]; } } /** * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(double[][] a1, double[][] a2) { for (int j = 0; j < a1.length; j++) { sum(a1[j], a2[j]); } } /** * Element-wise summation of two arrays, output writes over first array * * @param a1 first array * @param a2 second array */ public static void sum(double[] a1, double[] a2) { for (int j = 0; j < a1.length; j++) { a1[j] += a2[j]; } } }