annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java @ 98:156db25ad4b4

Add Statisticssupport also to VerticalProfiles gnv-artifacts/trunk@144 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 28 Sep 2009 10:20:41 +0000
parents fce237b6fdb8
children 158e89c2263b
rev   line source
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 * Title: TimeseriesStatistics, $Header: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/output/statistics/TimeseriesStatistics.java,v 1.3 2008/08/18 14:50:33 drewnak Exp $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 * Source: $Source: /share/gdi/SDI-Suite/Repository/projekte/BSH-GDI/genericViewer/src/main/java/de/conterra/bsh/gdi/gnviewer/output/statistics/TimeseriesStatistics.java,v $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 * created by: Stefan Blume (blume)
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5 * erstellt am: 06.12.2007
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
6 * Copyright: con terra GmbH, 2005
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 *
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 * modified by: $Author: drewnak $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 * modified on: $Date: 2008/08/18 14:50:33 $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 * Version: $Revision: 1.3 $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 * TAG: $Name: $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 * locked from: $Locker: $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 * CVS State: $State: Exp $
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 * Project: $ProjectName$
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 */
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 package de.intevation.gnv.statistics;
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
18 import java.sql.SQLException;
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 import java.util.ArrayList;
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
20 import java.util.Collection;
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
21 import java.util.Iterator;
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 import org.apache.commons.math.stat.regression.SimpleRegression;
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 import org.apache.log4j.Logger;
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
27 import de.intevation.gnv.geobackend.base.Result;
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
28 import de.intevation.gnv.geobackend.sde.datasources.ResultSet;
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
29 import de.intevation.gnv.statistics.exception.StatisticsException;
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
31
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 /**
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 * The class <code>TimeseriesStatistics</code> fulfills the following purposes:
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 * <ol>
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 * <li></li>
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 * </ol>
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 *
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39 * @author blume
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
40 * @author Tim Englich <tim.englich@intevation.de>
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 * @version 1.0
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 * @serial 1.0
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 * @see
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 * @since 06.12.2007 18:02:27
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 */
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 public class TimeseriesStatistics implements Statistics {
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 /**
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 * Default Logging instance
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 */
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
51 private static Logger log = Logger.getLogger(TimeseriesStatistics.class);
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
52 private static boolean sDebug = log.isDebugEnabled();
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
54 private Collection<Statistic> statistics = null;
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
56 public TimeseriesStatistics(){
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
57 super();
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
58 }
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
59
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
60 /**
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
61 * @see de.intevation.gnv.statistics.Statistics#calculateStatistics(java.util.Collection)
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
62 */
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
63 public Collection<Statistic> calculateStatistics(Collection<Result> resultSet) throws StatisticsException {
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 DescriptiveStatistics lStatistics = null;
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65 SimpleRegression lRegression = null;
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
66 statistics = new ArrayList<Statistic>();
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
67 String break1, break2;
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
68 int lSeries = 1;
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
69 try{
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
70
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
71 Iterator<Result> resultIterator = resultSet.iterator();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
72 if (resultIterator.hasNext()){
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
73 Result row = resultIterator.next();
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
74 break1 = row.getString("GROUP1");
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
75 break2 = row.getString("GROUP2");
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
76 lRegression = new SimpleRegression();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
77 lStatistics = DescriptiveStatistics.newInstance();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
78 while (resultIterator.hasNext()) {
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
79
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
80 if (!break1.equals(row.getString("GROUP1"))
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
81 || !break2.equals(row.getString("GROUP2"))) {
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
82 addStatisticsValues(lStatistics, lRegression, lSeries);
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
83
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
84 lStatistics.clear();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
85 lRegression.clear();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
86
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
87 lStatistics.addValue(row.getDouble("YORDINATE"));
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
88 Double x = this.calculateXOrdinateValue(row);
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
89 lRegression.addData(x ,row.getDouble("YORDINATE"));
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
90
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
91 break1 = row.getString("GROUP1");
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
92 break2 = row.getString("GROUP2");
97
fce237b6fdb8 Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents: 95
diff changeset
93 row = resultIterator.next();
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
94 lSeries ++;
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
95 }
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
96 else{
97
fce237b6fdb8 Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents: 95
diff changeset
97
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
98 lStatistics.addValue(row.getDouble("YORDINATE"));
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
99 Double x = this.calculateXOrdinateValue(row);
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
100 lRegression.addData(x,row.getDouble("YORDINATE"));
97
fce237b6fdb8 Bug fixed. Now all Values will be used to calculate the Statistics
Tim Englich <tim.englich@intevation.de>
parents: 95
diff changeset
101 row = resultIterator.next();
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
102 }
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
103
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
104 }
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
105 addStatisticsValues(lStatistics, lRegression,lSeries);
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
106 lStatistics.clear();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
107 lRegression.clear();
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
108 }
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
109 }
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
110 catch (Exception e){
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
111 log.error(e.getMessage(), e);
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
112 }
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
113
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
114 return statistics;
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
115 }
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
116
98
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
117
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
118 protected double calculateXOrdinateValue(Result row) throws SQLException{
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
119 return new Double( (row.getDate("XORDINATE")).getTime()/1000/3600) ;
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
120 }
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
121
156db25ad4b4 Add Statisticssupport also to VerticalProfiles
Tim Englich <tim.englich@intevation.de>
parents: 97
diff changeset
122
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
123 /**
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
124 * @param lStatistics
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
125 * @param lRegression
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
126 * @param lStats
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
127 * @param lSeries
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
128 */
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
129 private void addStatisticsValues(DescriptiveStatistics lStatistics,
95
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
130 SimpleRegression lRegression, int lSeries) {
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
131 statistics.add(new Statistic("gnviewer.statistics.series",(double)lSeries));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
132 statistics.add(new Statistic("gnviewer.statistics.descriptive.arithmeticMean", lStatistics.getMean()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
133 statistics.add(new Statistic("gnviewer.statistics.descriptive.kurtosis", lStatistics.getKurtosis()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
134 statistics.add(new Statistic("gnviewer.statistics.descriptive.max", lStatistics.getMax()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
135 statistics.add(new Statistic("gnviewer.statistics.descriptive.min", lStatistics.getMin()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
136 statistics.add(new Statistic("gnviewer.statistics.descriptive.n", lStatistics.getN()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
137 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.90", lStatistics.getPercentile(90)));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
138 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.75", lStatistics.getPercentile(75)));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
139 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.50", lStatistics.getPercentile(50)));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
140 statistics.add(new Statistic("gnviewer.statistics.descriptive.percentile.10", lStatistics.getPercentile(10)));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
141 statistics.add(new Statistic("gnviewer.statistics.descriptive.deviation", lStatistics.getStandardDeviation()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
142 statistics.add(new Statistic("gnviewer.statistics.descriptive.variance", lStatistics.getVariance()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
143 statistics.add(new Statistic("gnviewer.statistics.descriptive.intercept", lRegression.getIntercept()));
13402ac8d8fe Put the Statisticscalulation to the Outmethod of the OutputTransition.
Tim Englich <tim.englich@intevation.de>
parents: 94
diff changeset
144 statistics.add(new Statistic("gnviewer.statistics.descriptive.slope", lRegression.getSlope()));
94
6a825a184883 Remove Compile-Errors from the StatisticsPart
Tim Englich <tim.englich@intevation.de>
parents: 93
diff changeset
145 }
93
c476fbbaa4ca Imported Statistics-Classes from old Project. Revision: 3101 Does not compile
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
146 }

http://dive4elements.wald.intevation.org