Here you can find the source of subtract(double[] flowFrom, double[] flowTo)
private static double[] subtract(double[] flowFrom, double[] flowTo)
//package com.java2s; //License from project: Open Source License public class Main { private static double[] subtract(double[] flowFrom, double[] flowTo) { if (flowFrom.length == flowTo.length) { double[] netFlow = new double[flowFrom.length]; for (int i = 0; i < flowTo.length; i++) { netFlow[i] = flowFrom[i] - flowTo[i]; }/*ww w . jav a 2 s.c o m*/ return netFlow; } else return null; } }