Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/fitting/ArraySubstraction.java @ 9646:0380717105ba
Implemented alternative fitting strategy for Log-Linear function.
author | Gernot Belger <g.belger@bjoernsen.de> |
---|---|
date | Mon, 02 Dec 2019 17:56:15 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9645:eb1a29fe823f | 9646:0380717105ba |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.artifacts.model.fixings.fitting; | |
11 | |
12 /** | |
13 * @author Gernot Belger | |
14 */ | |
15 final class ArraySubstraction { | |
16 | |
17 private final double[] minuend; | |
18 | |
19 public ArraySubstraction(final double[] minuend) { | |
20 this.minuend = minuend; | |
21 } | |
22 | |
23 public double[] evaluate(final double[] subtrahend) { | |
24 | |
25 final double[] difference = new double[this.minuend.length]; | |
26 for (int i = 0; i < difference.length; i++) | |
27 difference[i] = this.minuend[i] - subtrahend[i]; | |
28 return difference; | |
29 } | |
30 } |