[Dive4elements-commits] [PATCH 05 of 10] Curve: Added field, getter and setter for suggestedMaxQ

Wald Commits scm-commit at wald.intevation.org
Wed Oct 31 14:09:05 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# 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<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) {


More information about the Dive4elements-commits mailing list