Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQ.java @ 747:65dcb5891206
ATWriter: Fixed array size to construct spline with stricly increasing values.
flys-artifacts/trunk@2251 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 27 Jun 2011 13:58:03 +0000 |
parents | b385577bcaca |
children | 30be4b71c36c |
rev | line source |
---|---|
726
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import gnu.trove.TDoubleArrayList; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 |
744
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
5 import java.util.Random; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
6 |
726
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 public class WQ |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 extends NamedObject |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 protected TDoubleArrayList w; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 protected TDoubleArrayList q; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 public WQ() { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 this(""); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 public WQ(String name) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 w = new TDoubleArrayList(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 q = new TDoubleArrayList(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 public WQ(int capacity) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 this(capacity, ""); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 public WQ(int capacity, String name) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 super(name); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 w = new TDoubleArrayList(capacity); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 q = new TDoubleArrayList(capacity); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 public WQ(double [] qs, double [] ws) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 this(qs, ws, ""); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 public WQ(double [] qs, double [] ws, String name) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 super(name); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 w = new TDoubleArrayList(ws); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 q = new TDoubleArrayList(qs); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 public void add(double w, double q) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 this.w.add(w); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 this.q.add(q); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 public int size() { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 return w.size(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 public double getW(int idx) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 return w.getQuick(idx); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 public double getQ(int idx) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 return q.getQuick(idx); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 public double [] get(int idx) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 return get(idx, new double [2]); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 public double [] get(int idx, double [] dst) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 dst[0] = w.getQuick(idx); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 dst[1] = q.getQuick(idx); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 return dst; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 public double [] getWs() { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 return w.toNativeArray(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 public double [] getQs() { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 return q.toNativeArray(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 public static void removeNaNs(TDoubleArrayList [] arrays) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 int dest = 0; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 int A = arrays.length; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 int N = arrays[0].size(); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 OUTER: for (int i = 0; i < N; ++i) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 for (int j = 0; j < A; ++j) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 TDoubleArrayList a = arrays[j]; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 double v = a.getQuick(i); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 if (Double.isNaN(v)) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 continue OUTER; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 a.setQuick(dest, v); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 ++dest; |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 if (dest < N) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 for (int i = 0; i < A; ++i) { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 arrays[i].remove(dest, N-dest); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 public void removeNaNs() { |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 removeNaNs(new TDoubleArrayList [] { w, q }); |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 } |
744
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
108 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
109 public boolean guessWaterIncreasing() { |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
110 return guessWaterIncreasing(0.05f); |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
111 } |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
112 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
113 public boolean guessWaterIncreasing(float factor) { |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
114 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
115 int N = w.size(); |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
116 int samples = (int)(factor*N) + 1; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
117 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
118 int up = 0; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
119 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
120 Random rand = new Random(); |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
121 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
122 for (int i = 0; i < samples; ++i) { |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
123 int pos = rand.nextInt(N-1) + 1; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
124 double w1 = w.getQuick(pos-1); |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
125 double w2 = w.getQuick(pos); |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
126 if (w2 > w1) ++up; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
127 } |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
128 |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
129 return up > samples/2; |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
130 } |
b385577bcaca
WQ: Added a method to guess is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
726
diff
changeset
|
131 |
726
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 } |
cbaa3ca86f2f
Added base class WQ for WQKms.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |