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