comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java @ 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 5a28312aee99
children e0add97c432b
comparison
equal deleted inserted replaced
4334:048b3c3acd01 4335:5948de9788d5
26 protected double [] ws; 26 protected double [] ws;
27 protected String function; 27 protected String function;
28 protected double [] coeffs; 28 protected double [] coeffs;
29 protected double chiSqr; 29 protected double chiSqr;
30 30
31 /** Suggested maximum value for q to input. */
32 protected double suggestedMaxQ;
33
31 // The spline is pretty heavy weight so cache it with a soft ref only. 34 // The spline is pretty heavy weight so cache it with a soft ref only.
32 protected transient SoftReference<Function> spline; 35 protected transient SoftReference<Function> spline;
33 protected transient Function extrapolation; 36 protected transient Function extrapolation;
34 37
35 public Curve() { 38 public Curve() {
44 ) { 47 ) {
45 this.qs = qs; 48 this.qs = qs;
46 this.ws = ws; 49 this.ws = ws;
47 this.function = function; 50 this.function = function;
48 this.coeffs = coeffs; 51 this.coeffs = coeffs;
52 this.suggestedMaxQ = Double.MAX_VALUE;
49 } 53 }
50 54
51 public double [] getQs() { 55 public double [] getQs() {
52 return qs; 56 return qs;
53 } 57 }
60 return function; 64 return function;
61 } 65 }
62 66
63 public double [] getCoeffs() { 67 public double [] getCoeffs() {
64 return coeffs; 68 return coeffs;
69 }
70
71
72 public void setSuggestedMaxQ(double newMaxQ) {
73 this.suggestedMaxQ = newMaxQ;
74 }
75
76
77 public double getSuggestedMaxQ() {
78 return this.suggestedMaxQ;
65 } 79 }
66 80
67 81
68 /** Calculate value at given x. */ 82 /** Calculate value at given x. */
69 @Override 83 @Override

http://dive4elements.wald.intevation.org