ingo@686: package de.intevation.flys.artifacts.model; ingo@686: ingo@686: import org.apache.log4j.Logger; ingo@686: ingo@686: public class Calculation3 ingo@686: extends Calculation ingo@686: { ingo@686: private static Logger logger = Logger.getLogger(Calculation3.class); ingo@686: ingo@686: protected double km; ingo@686: protected int [] days; ingo@686: protected double [] qs; ingo@686: ingo@686: public Calculation3() { ingo@686: } ingo@686: ingo@686: public Calculation3(double km, int [] days, double [] qs) { ingo@686: this.km = km; ingo@686: this.days = days; ingo@686: this.qs = qs; ingo@686: } ingo@686: ingo@686: public WQDay calculate(WstValueTable wst) { ingo@686: ingo@686: double [] ws = wst.interpolateW(km, qs, new double[qs.length], this); ingo@686: ingo@686: WQDay wqday = new WQDay(days, ws, qs); ingo@686: ingo@686: if (hasProblems()) { ingo@686: logger.debug("calculation caused "+numProblems()+" problem(s)."); ingo@686: wqday.removeNaNs(); ingo@686: } ingo@686: ingo@686: return wqday; ingo@686: } ingo@686: } ingo@686: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :