Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalWQTimerange.java @ 3061:49baebb39305
FixA: Add interpolation of parameters that better suits the instantiation real functions.
flys-artifacts/trunk@4641 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 12 Jun 2012 08:11:36 +0000 |
parents | b8df8d1476ba |
children | 1d8faeedda0c 1755a1bfe5ce |
line wrap: on
line source
package de.intevation.flys.artifacts.model; import gnu.trove.TDoubleArrayList; /** * A subclass of WQTimerange that stores besides W, Q and Timerange values * another double value. * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class HistoricalWQTimerange extends WQTimerange { protected TDoubleArrayList diffs; public HistoricalWQTimerange(String name) { super(name); diffs = new TDoubleArrayList(); } public void add(double w, double q, double diff, Timerange t) { ws.add(w); qs.add(q); ts.add(t); diffs.add(diff); } /** * This method requires a 3dim double array for <i>res</i>! */ @Override public double[] get(int idx, double[] res) { res[0] = ws.getQuick(idx); res[1] = qs.getQuick(idx); res[2] = diffs.getQuick(idx); return res; } public double[] getDiffs() { return diffs.toNativeArray(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :