Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/SQFractionResult.java @ 6827:2972a219743d
Fix typo in SQRelation calculation
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 14 Aug 2013 15:20:01 +0200 |
parents | af13ceeba52a |
children |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3552
diff
changeset
|
9 package org.dive4elements.river.artifacts.model.sq; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
3552
diff
changeset
|
11 import org.dive4elements.river.artifacts.model.Parameters; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
3304
02d5731b43a2
SQ relation: Build a valid SQResult.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3105
diff
changeset
|
13 import java.io.Serializable; |
02d5731b43a2
SQ relation: Build a valid SQResult.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3105
diff
changeset
|
14 |
02d5731b43a2
SQ relation: Build a valid SQResult.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3105
diff
changeset
|
15 import java.util.List; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
17 public class SQFractionResult |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
18 implements Serializable |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
19 { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
20 public static class Iteration |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
21 implements Serializable |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
22 { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
23 protected Parameters parameters; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
24 protected SQ [] measurements; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
25 protected SQ [] outliers; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
27 public Iteration() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
28 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
29 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
30 public Iteration( |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
31 Parameters parameters, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
32 SQ [] measurements, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
33 SQ [] outliers |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
34 ) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
35 this.parameters = parameters; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
36 this.measurements = measurements; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
37 this.outliers = outliers; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
38 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
39 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
40 public Parameters getParameters() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
41 return parameters; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
42 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
43 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
44 public void setParameters(Parameters parameters) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
45 this.parameters = parameters; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
46 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
47 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
48 public SQ [] getMeasurements() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
49 return measurements; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
50 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
51 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
52 public void setMeasurements(SQ [] measurements) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
53 this.measurements = measurements; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
54 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
55 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
56 public SQ [] getOutliers() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
57 return outliers; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
58 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
59 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
60 public void setOutliers(SQ [] outliers) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
61 this.outliers = outliers; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
62 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
63 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
64 public boolean isValid() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
65 return parameters != null |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
66 && measurements != null |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
67 && outliers != null; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
68 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
69 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
70 public int numOutliers() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
71 return outliers != null |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
72 ? outliers.length |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
73 : 0; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
74 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
75 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
76 public int numMeasurements() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
77 return measurements != null |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
78 ? measurements.length |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
79 : 0; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
80 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
81 } // class Iteration |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
82 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
83 protected SQ [] measurements; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
84 protected List<Iteration> iterations; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 public SQFractionResult() { |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 public SQFractionResult( |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
90 SQ [] measurements, |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
91 List<Iteration> iterations |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 ) { |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 this.measurements = measurements; |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
94 this.iterations = iterations; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
97 public SQ [] getMeasurements() { |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 return measurements; |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
101 public void setMeasurements(SQ [] measurements) { |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 this.measurements = measurements; |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
105 public List<Iteration> getIterations() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
106 return iterations; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
109 public void setIterations(List<Iteration> iterations) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
110 this.iterations = iterations; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
113 public double [] getQExtent() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
114 return getQExtent(new double[2]); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
115 } |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
117 public double [] getQExtent(double extent[]) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
118 extent[0] = Double.MAX_VALUE; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
119 extent[1] = -Double.MIN_VALUE; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
120 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
121 for (SQ sq: measurements) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
122 double q = sq.getQ(); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
123 if (q < extent[0]) extent[0] = q; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
124 if (q > extent[1]) extent[1] = q; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
127 return extent; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
130 public int numIterations() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
131 return iterations != null ? iterations.size() : 0; |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 } |
3105
9592b7d76633
Generate fake data for SQ curves; Implemented the Facet and Generator stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3101
diff
changeset
|
133 |
3552
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
134 public Parameters getParameters() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
135 return iterations != null && !iterations.isEmpty() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
136 ? iterations.get(iterations.size()-1).getParameters() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
137 : null; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
138 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
139 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
140 public SQ [] getOutliers(int index) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
141 return index >= 0 && index < iterations.size() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
142 ? iterations.get(index).getOutliers() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
143 : null; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
144 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
145 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
146 public Parameters getParameters(int index) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
147 return index >= 0 && index < iterations.size() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
148 ? iterations.get(index).getParameters() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
149 : null; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
150 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
151 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
152 public SQ [] getMeasurements(int index) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
153 return index >= 0 && index < iterations.size() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
154 ? iterations.get(index).getMeasurements() |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
155 : null; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
156 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
157 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
158 public int totalNumOutliers() { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
159 int sum = 0; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
160 if (iterations != null) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
161 for (Iteration iteration: iterations) { |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
162 sum += iteration.numOutliers(); |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
163 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
164 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
165 return sum; |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
166 } |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
167 |
1df6984628c3
S/Q: Extented the result data model of the S/Q calculation to
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3392
diff
changeset
|
168 public int numMeasurements() { |
3392
56f62b5209f5
S/Q relation: Write parameters as export result.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3310
diff
changeset
|
169 return measurements != null |
56f62b5209f5
S/Q relation: Write parameters as export result.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3310
diff
changeset
|
170 ? measurements.length |
56f62b5209f5
S/Q relation: Write parameters as export result.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3310
diff
changeset
|
171 : 0; |
56f62b5209f5
S/Q relation: Write parameters as export result.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3310
diff
changeset
|
172 } |
3101
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
173 } |
b31397addf2f
Create Facets for each SQResult and SQFractionResult.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
174 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |