changeset 4335:5948de9788d5

Curve: Added field, getter and setter for suggestedMaxQ . This new field is to suggest an "end" of the curve.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Oct 2012 13:52:28 +0100
parents 048b3c3acd01
children 09993be04c5e
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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<Function> 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) {

http://dive4elements.wald.intevation.org