g@9646: /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde g@9646: * Software engineering by g@9646: * Björnsen Beratende Ingenieure GmbH g@9646: * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt g@9646: * g@9646: * This file is Free Software under the GNU AGPL (>=v3) g@9646: * and comes with ABSOLUTELY NO WARRANTY! Check out the g@9646: * documentation coming with Dive4Elements River for details. g@9646: */ g@9646: package org.dive4elements.river.artifacts.model.fixings.fitting; g@9646: g@9646: /** g@9646: * @author Gernot Belger g@9646: */ g@9646: final class ArraySubstraction { g@9646: g@9646: private final double[] minuend; g@9646: g@9646: public ArraySubstraction(final double[] minuend) { g@9646: this.minuend = minuend; g@9646: } g@9646: g@9646: public double[] evaluate(final double[] subtrahend) { g@9646: g@9646: final double[] difference = new double[this.minuend.length]; g@9646: for (int i = 0; i < difference.length; i++) g@9646: difference[i] = this.minuend[i] - subtrahend[i]; g@9646: return difference; g@9646: } g@9646: }