Here you can find the source of subtract(final double[] a, final double[] b, final double[] c)
Parameter | Description |
---|---|
a | a parameter |
b | a parameter |
c | a parameter |
public static void subtract(final double[] a, final double[] b, final double[] c)
//package com.java2s; public class Main { /**/*from www . j av a 2 s. c o m*/ * set c = a - b. Dimensions of a, b, and c must match. In place subtraction * (c==a) is permitted. * * @param a * @param b * @param c */ public static void subtract(final double[] a, final double[] b, final double[] c) { assert (rows(a) == rows(b)) && (rows(a) == rows(c)); final int rows = rows(a); for (int i = 0; i < rows; ++i) c[i] = a[i] - b[i]; } public static int rows(final double[] a) { return a.length; } public static int rows(final double[][] A) { return A.length; } }