# HG changeset patch # User Felix Wolfsteller # Date 1351687948 -3600 # Node ID 5948de9788d56abd0df1fb0c52ad2f90cc2b9e29 # Parent 048b3c3acd01d954d479b660e2d16cd364538c43 Curve: Added field, getter and setter for suggestedMaxQ . This new field is to suggest an "end" of the curve. diff -r 048b3c3acd01 -r 5948de9788d5 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java Wed Oct 31 13:46:04 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java Wed Oct 31 13:52:28 2012 +0100 @@ -28,6 +28,9 @@ protected double [] coeffs; protected double chiSqr; + /** Suggested maximum value for q to input. */ + protected double suggestedMaxQ; + // The spline is pretty heavy weight so cache it with a soft ref only. protected transient SoftReference spline; protected transient Function extrapolation; @@ -46,6 +49,7 @@ this.ws = ws; this.function = function; this.coeffs = coeffs; + this.suggestedMaxQ = Double.MAX_VALUE; } public double [] getQs() { @@ -65,6 +69,16 @@ } + public void setSuggestedMaxQ(double newMaxQ) { + this.suggestedMaxQ = newMaxQ; + } + + + public double getSuggestedMaxQ() { + return this.suggestedMaxQ; + } + + /** Calculate value at given x. */ @Override public double value(double x) {