Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WW.java @ 2201:4e3bfa2d9584
"Bezugslinienverfahren": Add start and end km to WW to determine if kms are at gauges.
flys-artifacts/trunk@3819 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 30 Jan 2012 09:57:59 +0000 |
parents | 672a41efe222 |
children | 9dc81827b187 |
comparison
equal
deleted
inserted
replaced
2200:575ed0248be2 | 2201:4e3bfa2d9584 |
---|---|
47 } | 47 } |
48 } // class FunctionIterator | 48 } // class FunctionIterator |
49 | 49 |
50 protected TDoubleArrayList ws2; | 50 protected TDoubleArrayList ws2; |
51 | 51 |
52 protected double startKm; | |
53 protected double endKm; | |
54 | |
52 public WW() { | 55 public WW() { |
53 } | 56 } |
54 | 57 |
55 public WW(String name) { | 58 public WW(String name) { |
56 super(name); | 59 super(name); |
63 public WW(int capacity, String name) { | 66 public WW(int capacity, String name) { |
64 super(capacity, name); | 67 super(capacity, name); |
65 ws2 = new TDoubleArrayList(capacity); | 68 ws2 = new TDoubleArrayList(capacity); |
66 } | 69 } |
67 | 70 |
68 public WW(String name, double [] ws, double [] ws2) { | 71 public WW( |
69 this.name = name; | 72 String name, |
70 this.ws = new TDoubleArrayList(ws); | 73 double startKm, |
71 this.ws2 = new TDoubleArrayList(ws2); | 74 double [] ws, |
75 double endKm, | |
76 double [] ws2 | |
77 ) { | |
78 this.name = name; | |
79 this.ws = new TDoubleArrayList(ws); | |
80 this.ws2 = new TDoubleArrayList(ws2); | |
81 this.startKm = startKm; | |
82 this.endKm = endKm; | |
72 } | 83 } |
73 | 84 |
74 public WW(String name, TDoubleArrayList ws, TDoubleArrayList ws2) { | 85 public WW(String name, TDoubleArrayList ws, TDoubleArrayList ws2) { |
75 this.name = name; | 86 this.name = name; |
76 this.ws = ws; | 87 this.ws = ws; |
100 dst[0] = ws .getQuick(idx); | 111 dst[0] = ws .getQuick(idx); |
101 dst[1] = ws2.getQuick(idx); | 112 dst[1] = ws2.getQuick(idx); |
102 return dst; | 113 return dst; |
103 } | 114 } |
104 | 115 |
116 public double getStartKm() { | |
117 return startKm; | |
118 } | |
119 | |
120 public void setStartKm(double startKm) { | |
121 this.startKm = startKm; | |
122 } | |
123 | |
124 public double getEndKm() { | |
125 return endKm; | |
126 } | |
127 | |
128 public void setEndKm(double endKm) { | |
129 this.endKm = endKm; | |
130 } | |
131 | |
105 @Override | 132 @Override |
106 public void removeNaNs() { | 133 public void removeNaNs() { |
107 removeNaNs(new TDoubleArrayList [] { ws, ws2 }); | 134 removeNaNs(new TDoubleArrayList [] { ws, ws2 }); |
108 } | 135 } |
109 | 136 |