Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/sq/Outlier.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 |
---|---|
35 public EvalSQ(SQ sq) { | 35 public EvalSQ(SQ sq) { |
36 this.sq = sq; | 36 this.sq = sq; |
37 } | 37 } |
38 } // class EvalSQ | 38 } // class EvalSQ |
39 | 39 |
40 public static List<SQ> detectOutliers( | 40 public static SQ [] detectOutliers( |
41 Callback callback, | 41 Callback callback, |
42 List<SQ> sqs, | 42 List<SQ> sqs, |
43 double stdDevFactor | 43 double stdDevFactor |
44 ) | 44 ) |
45 throws MathException | 45 throws MathException |
89 good.clear(); | 89 good.clear(); |
90 } | 90 } |
91 | 91 |
92 callback.finished(); | 92 callback.finished(); |
93 | 93 |
94 List<SQ> result = new ArrayList<SQ>(good.size()); | 94 SQ [] result = new SQ[good.size()]; |
95 | 95 |
96 for (EvalSQ esq: good) { | 96 for (int i = 0; i < result.length; ++i) { |
97 result.add(esq.sq); | 97 result[i] = good.get(i).sq; |
98 } | 98 } |
99 | 99 |
100 return result; | 100 return result; |
101 } | 101 } |
102 | 102 |