annotate flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedHeightSingle.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightSingle.java@0a0ab6909cd8
children
rev   line source
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4533
diff changeset
1 package org.dive4elements.river.artifacts.model.minfo;
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
3 import gnu.trove.TDoubleArrayList;
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
4
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 public class BedHeightSingle
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 extends BedHeight
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8 {
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 protected int year;
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
11 protected TDoubleArrayList data_gap;
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
12 protected TDoubleArrayList morphWidth;
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 public BedHeightSingle() {
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 super();
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 this.year = -1;
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
17 data_gap = new TDoubleArrayList();
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
18 morphWidth = new TDoubleArrayList();
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 }
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 public BedHeightSingle(String name) {
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 super(name);
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 this.year = -1;
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
24 data_gap = new TDoubleArrayList();
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
25 morphWidth = new TDoubleArrayList();
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 }
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 public void add(
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 double value,
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 double station,
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 double gap,
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 double width,
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 int year
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 ) {
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
35 super.add(value, station);
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 this.year = year;
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
37 this.data_gap.add(gap);
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
38 this.morphWidth.add(width);
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 }
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 public int getYear() {
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 return this.year;
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 }
3897
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
44
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
45 public double getMorphWidth(int idx) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
46 return this.morphWidth.get(idx);
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
47 }
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
48
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
49 public double getDataGap(int idx) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
50 return this.data_gap.get(idx);
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
51 }
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
52
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
53 public double getMorphWidth(double station) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
54 if (this.station.indexOf(station) >= 0) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
55 return this.morphWidth.get(this.station.indexOf(station));
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
56 }
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
57 return Double.NaN;
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
58 }
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
59
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
60 public double getDataGap(double station) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
61 if (this.station.indexOf(station) >= 0) {
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
62 return this.getDataGap(this.station.indexOf(station));
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
63 }
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
64 return Double.NaN;
bce2dd4310a6 MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 3886
diff changeset
65 }
4533
0a0ab6909cd8 Add method to get all morph width of a BedHeigthSingle object
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3897
diff changeset
66
0a0ab6909cd8 Add method to get all morph width of a BedHeigthSingle object
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3897
diff changeset
67 public double[] getMorphWidths() {
0a0ab6909cd8 Add method to get all morph width of a BedHeigthSingle object
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3897
diff changeset
68 return this.morphWidth.toNativeArray();
0a0ab6909cd8 Add method to get all morph width of a BedHeigthSingle object
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3897
diff changeset
69 }
3886
633fbb61a0cc Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 }

http://dive4elements.wald.intevation.org