Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WW.java @ 2235:ee5310134463
Cosmetics/care/refac.
flys-artifacts/trunk@3879 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 02 Feb 2012 13:23:55 +0000 |
parents | 9dc81827b187 |
children | dd93a8e1377a |
rev | line source |
---|---|
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
2198
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
3 import de.intevation.flys.artifacts.math.Function; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
4 import de.intevation.flys.artifacts.math.Identity; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
5 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 import gnu.trove.TDoubleArrayList; |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 public class WW |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 extends W |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 { |
2198
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
11 public static class ApplyFunctionIterator |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
12 { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
13 protected Function function1; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
14 protected Function function2; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
15 protected int pos; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
16 protected WW ww; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
17 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
18 public ApplyFunctionIterator(WW ww) { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
19 this.ww = ww; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
20 this.function1 = Identity.IDENTITY; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
21 this.function2 = Identity.IDENTITY; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
22 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
23 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
24 public boolean hasNext() { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
25 return pos < ww.size(); |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
26 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
27 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
28 public int size() { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
29 return ww.size(); |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
30 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
31 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
32 public void reset() { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
33 pos = 0; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
34 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
35 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
36 public WW getWW() { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
37 return ww; |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
38 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
39 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
40 public void get(int idx, double [] wwPair) { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
41 wwPair[0] = function1.value(ww.getW(idx)); |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
42 wwPair[1] = function2.value(ww.getW2(idx)); |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
43 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
44 |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
45 public void next(double [] wwPair) { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
46 get(pos++, wwPair); |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
47 } |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
48 } // class FunctionIterator |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
49 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 protected TDoubleArrayList ws2; |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 |
2201
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
52 protected double startKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
53 protected double endKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
54 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 public WW() { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 public WW(String name) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 super(name); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 public WW(int capacity) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 this(capacity, ""); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 public WW(int capacity, String name) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 super(capacity, name); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 ws2 = new TDoubleArrayList(capacity); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 |
2201
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
71 public WW( |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
72 String name, |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
73 double startKm, |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
74 double [] ws, |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
75 double endKm, |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
76 double [] ws2 |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
77 ) { |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
78 this.name = name; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
79 this.ws = new TDoubleArrayList(ws); |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
80 this.ws2 = new TDoubleArrayList(ws2); |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
81 this.startKm = startKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
82 this.endKm = endKm; |
2186
ec2574eb2d32
Added calculation class for "Bezugslinienverfahren" to created by WINFOArtifact.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2182
diff
changeset
|
83 } |
ec2574eb2d32
Added calculation class for "Bezugslinienverfahren" to created by WINFOArtifact.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2182
diff
changeset
|
84 |
2197
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
85 public WW(String name, TDoubleArrayList ws, TDoubleArrayList ws2) { |
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
86 this.name = name; |
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
87 this.ws = ws; |
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
88 this.ws2 = ws2; |
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
89 } |
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
90 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 public void add(double w1, double w2) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 ws .add(w1); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 ws2.add(w2); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 |
2229
9dc81827b187
Add some fake 'input' data for reference curve. plot references curves from input km to input km +2.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2201
diff
changeset
|
96 public double getW1(int idx) { |
9dc81827b187
Add some fake 'input' data for reference curve. plot references curves from input km to input km +2.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2201
diff
changeset
|
97 return ws.getQuick(idx); |
9dc81827b187
Add some fake 'input' data for reference curve. plot references curves from input km to input km +2.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2201
diff
changeset
|
98 } |
9dc81827b187
Add some fake 'input' data for reference curve. plot references curves from input km to input km +2.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2201
diff
changeset
|
99 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 public double getW2(int idx) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 return ws2.getQuick(idx); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 public double [] getWs2() { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 return ws2.toNativeArray(); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 @Override |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 public double [] get(int idx) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 return get(idx, new double[2]); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 @Override |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 public double [] get(int idx, double [] dst) { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
115 dst[0] = ws .getQuick(idx); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
116 dst[1] = ws2.getQuick(idx); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 return dst; |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
118 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
119 |
2201
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
120 public double getStartKm() { |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
121 return startKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
122 } |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
123 |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
124 public void setStartKm(double startKm) { |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
125 this.startKm = startKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
126 } |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
127 |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
128 public double getEndKm() { |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
129 return endKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
130 } |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
131 |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
132 public void setEndKm(double endKm) { |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
133 this.endKm = endKm; |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
134 } |
4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2198
diff
changeset
|
135 |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 @Override |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 public void removeNaNs() { |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 removeNaNs(new TDoubleArrayList [] { ws, ws2 }); |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
139 } |
2197
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
140 |
2198
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
141 public double minWs2() { |
672a41efe222
"Bezugslinienverfahren": Replaced normalized curve generation with a better and needed solution.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2197
diff
changeset
|
142 return ws2.min(); |
2197
5781847433d8
"Bezugslinienverfahren": Implemented the on-the-flys shift to (0, 0).
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2186
diff
changeset
|
143 } |
2182
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 } |
5ff481ab24a1
Refactored class hierachy to integrate model for W~W.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |