Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedParametersResult.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/BedParametersResult.java@a5f65e8983be |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.artifacts.model.minfo; | |
2 | |
3 import gnu.trove.TDoubleArrayList; | |
4 | |
5 import java.io.Serializable; | |
6 | |
7 | |
8 public class BedParametersResult | |
9 implements Serializable | |
10 { | |
11 protected TDoubleArrayList porosityCap; | |
12 protected TDoubleArrayList porositySub; | |
13 protected TDoubleArrayList loadDensityCap; | |
14 protected TDoubleArrayList loadDensitySub; | |
15 protected TDoubleArrayList kms; | |
16 | |
17 public BedParametersResult() { | |
18 | |
19 } | |
20 | |
21 public BedParametersResult( | |
22 TDoubleArrayList kms, | |
23 TDoubleArrayList porosityCap, | |
24 TDoubleArrayList porositySub, | |
25 TDoubleArrayList densityCap, | |
26 TDoubleArrayList densitySub | |
27 ) { | |
28 this.kms = kms; | |
29 this.porosityCap = porosityCap; | |
30 this.porositySub = porositySub; | |
31 this.loadDensityCap = densityCap; | |
32 this.loadDensitySub = densitySub; | |
33 } | |
34 | |
35 public double getPorosityCap(int ndx) { | |
36 return porosityCap.get(ndx); | |
37 } | |
38 | |
39 public double getPorositySub(int ndx) { | |
40 return porositySub.get(ndx); | |
41 } | |
42 | |
43 public double getLoadDensityCap(int ndx) { | |
44 return loadDensityCap.get(ndx); | |
45 } | |
46 | |
47 public double getLoadDensitySub(int ndx) { | |
48 return loadDensitySub.get(ndx); | |
49 } | |
50 | |
51 public double getPorosityCap(double km) { | |
52 if (kms.indexOf(km) >= 0) { | |
53 return porosityCap.get(kms.indexOf(km)); | |
54 } | |
55 return Double.NaN; | |
56 } | |
57 | |
58 public double getPorositySub(double km) { | |
59 if (kms.indexOf(km) >= 0) { | |
60 return porositySub.get(kms.indexOf(km)); | |
61 } | |
62 return Double.NaN; | |
63 } | |
64 | |
65 public double getLoadDensityCap(double km) { | |
66 if (kms.indexOf(km) >= 0) { | |
67 return loadDensityCap.get(kms.indexOf(km)); | |
68 } | |
69 return Double.NaN; | |
70 } | |
71 | |
72 public double getLoadDensitySub(double km) { | |
73 if (kms.indexOf(km) >= 0) { | |
74 return loadDensitySub.get(kms.indexOf(km)); | |
75 } | |
76 return Double.NaN; | |
77 } | |
78 | |
79 public double[][] getPorosityCapData() { | |
80 return new double[][] { | |
81 kms.toNativeArray(), | |
82 porosityCap.toNativeArray() | |
83 }; | |
84 } | |
85 | |
86 public double[][] getPorositySubData() { | |
87 return new double[][] { | |
88 kms.toNativeArray(), | |
89 porositySub.toNativeArray() | |
90 }; | |
91 } | |
92 | |
93 public double[][] getDensityCapData() { | |
94 return new double[][] { | |
95 kms.toNativeArray(), | |
96 loadDensityCap.toNativeArray() | |
97 }; | |
98 } | |
99 | |
100 public double[][] getDensitySubData() { | |
101 return new double[][] { | |
102 kms.toNativeArray(), | |
103 loadDensitySub.toNativeArray() | |
104 }; | |
105 } | |
106 } |