Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java @ 3076:5642a83420f2
FLYS artifacts: Removed trailing whitespace.
flys-artifacts/trunk@4670 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jun 2012 09:30:07 +0000 |
parents | 0d8c97374dc9 |
children | c1f445b94d03 |
comparison
equal
deleted
inserted
replaced
3075:db9e2bb34707 | 3076:5642a83420f2 |
---|---|
98 public double [] splineQs; | 98 public double [] splineQs; |
99 public double [] splineWs; | 99 public double [] splineWs; |
100 | 100 |
101 public SplineFunction( | 101 public SplineFunction( |
102 PolynomialSplineFunction spline, | 102 PolynomialSplineFunction spline, |
103 double [] splineQs, | 103 double [] splineQs, |
104 double [] splineWs | 104 double [] splineWs |
105 ) { | 105 ) { |
106 this.spline = spline; | 106 this.spline = spline; |
107 this.splineQs = splineQs; | 107 this.splineQs = splineQs; |
108 this.splineWs = splineWs; | 108 this.splineWs = splineWs; |
109 } | 109 } |
110 | 110 |
111 public double [][] sample( | 111 public double [][] sample( |
112 int numSamples, | 112 int numSamples, |
113 double km, | 113 double km, |
114 Calculation errors | 114 Calculation errors |
115 ) { | 115 ) { |
116 double minQ = getQMin(); | 116 double minQ = getQMin(); |
117 double maxQ = getQMax(); | 117 double maxQ = getQMax(); |
118 | 118 |
444 } | 444 } |
445 | 445 |
446 public double [] findQsForW( | 446 public double [] findQsForW( |
447 Row other, | 447 Row other, |
448 double w, | 448 double w, |
449 double km, | 449 double km, |
450 WstValueTable table | 450 WstValueTable table |
451 ) { | 451 ) { |
452 TDoubleArrayList qs = new TDoubleArrayList(); | 452 TDoubleArrayList qs = new TDoubleArrayList(); |
453 | 453 |
454 double factor = Linear.factor(km, this.km, other.km); | 454 double factor = Linear.factor(km, this.km, other.km); |
1033 return sf; | 1033 return sf; |
1034 } | 1034 } |
1035 | 1035 |
1036 /** 'Bezugslinienverfahren' */ | 1036 /** 'Bezugslinienverfahren' */ |
1037 public double [][] relateWs( | 1037 public double [][] relateWs( |
1038 double km1, | 1038 double km1, |
1039 double km2, | 1039 double km2, |
1040 Calculation errors | 1040 Calculation errors |
1041 ) { | 1041 ) { |
1042 return relateWs(km1, km2, RELATE_WS_SAMPLES, errors); | 1042 return relateWs(km1, km2, RELATE_WS_SAMPLES, errors); |
1043 } | 1043 } |
1059 } | 1059 } |
1060 } // class ErrorHandler | 1060 } // class ErrorHandler |
1061 | 1061 |
1062 | 1062 |
1063 /* TODO: Add optimized methods of relateWs to relate one | 1063 /* TODO: Add optimized methods of relateWs to relate one |
1064 * start km to many end kms. The index generation/spline stuff for | 1064 * start km to many end kms. The index generation/spline stuff for |
1065 * the start km is always the same. | 1065 * the start km is always the same. |
1066 */ | 1066 */ |
1067 public double [][] relateWs( | 1067 public double [][] relateWs( |
1068 double km1, | 1068 double km1, |
1069 double km2, | 1069 double km2, |
1070 int numSamples, | 1070 int numSamples, |
1071 Calculation errors | 1071 Calculation errors |
1072 ) { | 1072 ) { |
1073 SplineFunction sf1 = createSpline(km1, errors); | 1073 SplineFunction sf1 = createSpline(km1, errors); |
1154 qs2.add(q2); | 1154 qs2.add(q2); |
1155 } | 1155 } |
1156 | 1156 |
1157 return new double [][] { | 1157 return new double [][] { |
1158 ws1.toNativeArray(), | 1158 ws1.toNativeArray(), |
1159 qs1.toNativeArray(), | 1159 qs1.toNativeArray(), |
1160 ws2.toNativeArray(), | 1160 ws2.toNativeArray(), |
1161 qs2.toNativeArray() }; | 1161 qs2.toNativeArray() }; |
1162 } | 1162 } |
1163 | 1163 |
1164 public QPosition getQPosition(double km, double q) { | 1164 public QPosition getQPosition(double km, double q) { |