Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Fitting.java @ 3190:49fe2ed03c12
SQ: Refactored fitting to better fit the data types of SQResult.
flys-artifacts/trunk@4805 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 26 Jun 2012 17:20:31 +0000 |
parents | 1e46ced2bb57 |
children | 1df6984628c3 |
comparison
equal
deleted
inserted
replaced
3189:89dc2db3a202 | 3190:49fe2ed03c12 |
---|---|
26 | 26 |
27 protected double standardDeviation; | 27 protected double standardDeviation; |
28 | 28 |
29 protected double chiSqr; | 29 protected double chiSqr; |
30 | 30 |
31 protected List<SQ> remaining; | 31 protected SQ [] remaining; |
32 | 32 |
33 protected List<List<SQ>> outliers; | 33 protected List<SQ []> outliers; |
34 | 34 |
35 public Fitting() { | 35 public Fitting() { |
36 } | 36 } |
37 | 37 |
38 public Fitting(Function function, double stdDevFactor) { | 38 public Fitting(Function function, double stdDevFactor) { |
78 | 78 |
79 public void setChiSqr(double chiSqr) { | 79 public void setChiSqr(double chiSqr) { |
80 this.chiSqr = chiSqr; | 80 this.chiSqr = chiSqr; |
81 } | 81 } |
82 | 82 |
83 public List<SQ> getRemaining() { | 83 public SQ [] getRemaining() { |
84 return remaining; | 84 return remaining; |
85 } | 85 } |
86 | 86 |
87 public void setRemaining(List<SQ> remaining) { | 87 public void setRemaining(SQ [] remaining) { |
88 this.remaining = remaining; | 88 this.remaining = remaining; |
89 } | 89 } |
90 | 90 |
91 public List<List<SQ>> getOutliers() { | 91 public List<SQ []> getOutliers() { |
92 return outliers; | 92 return outliers; |
93 } | 93 } |
94 | 94 |
95 public void setOutliers(List<List<SQ>> outliers) { | 95 public void setOutliers(List<SQ []> outliers) { |
96 this.outliers = outliers; | 96 this.outliers = outliers; |
97 } | 97 } |
98 | 98 |
99 public void reset() { | 99 public void reset() { |
100 outliers = null; | 100 outliers = null; |
201 chiSqr = lmo.getChiSquare(); | 201 chiSqr = lmo.getChiSquare(); |
202 } | 202 } |
203 | 203 |
204 @Override | 204 @Override |
205 public void finished() { | 205 public void finished() { |
206 setOutliers(outliers); | 206 List<SQ []> result = |
207 new ArrayList<SQ []>(outliers.size()); | |
208 | |
209 for (List<SQ> ols: outliers) { | |
210 result.add(ols.toArray(new SQ[ols.size()])); | |
211 } | |
212 | |
213 setOutliers(result); | |
207 } | 214 } |
208 }, | 215 }, |
209 sqs, | 216 sqs, |
210 stdDevFactor); | 217 stdDevFactor); |
211 } | 218 } |