Java Array Subtract subtract(float a[][][], float b[][][])

Here you can find the source of subtract(float a[][][], float b[][][])

Description

Create matrix c = a - b

License

CeCILL license

Parameter

Parameter Description
a a parameter
b a parameter

Return

c = a-b

Declaration

public static float[][][] subtract(float a[][][], float b[][][]) 

Method Source Code

//package com.java2s;
//License from project: CeCILL license 

public class Main {
    /**//from   ww  w  .  j  ava  2 s .c  o m
     * Create matrix c = a - b
     * 
     * @param a
     * @param b
     * @return c = a-b
     */
    public static float[][][] subtract(float a[][][], float b[][][]) {
        int l = a.length;
        int m = a[0].length;
        int n = a[0][0].length;
        float[][][] c = new float[l][m][n];
        for (int i = 0; i < l; i++)
            for (int j = 0; j < m; j++)
                for (int k = 0; k < n; k++)
                    c[i][j][k] = a[i][j][k] - b[i][j][k];
        return c;
    }
}

Related

  1. subtract(double[][] dest, double[][] a, double[][] b)
  2. subtract(final double[] a, final double[] b, final double[] c)
  3. subtract(final double[] first, final double[] second)
  4. subtract(final double[] v1, final double[] v2)
  5. subtract(final double[] vector1, final double[] vector2)
  6. subtract(float[] dividend, float[] divisor)
  7. subtract(int a, int[] b)
  8. subtract(int bytesPerDim, int dim, byte[] a, byte[] b, byte[] result)
  9. subtract(int[] a, int[] b)