Java Doc for Statistics.java in  » GIS » GeoTools-2.4.1 » org » geotools » math » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.math 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.math.Statistics

Statistics
public class Statistics implements Cloneable,Serializable(Code)
Hold some statistics about a series of sample values. Given a series of sample values s0, s1, s2, s3..., this class computes , , , and . Statistics are computed on the fly; the sample values are never stored in memory.

An instance of Statistics is initially empty (i.e. all statistical values are set to Double.NaN NaN ). The statistics are updated every time an Statistics.add(double) method is invoked with a non- value. A typical usage of this class is:

 double[] data = new double[1000];
 // (Compute some data values here...)
 Statistics stats = new Statistics();
 for (int i=0; i<data.length; i++) {
 stats.add(data[i]);
 }
 System.out.println(stats);
 

version:
   $Id: Statistics.java 22443 2006-10-27 20:47:22Z desruisseaux $
author:
   Martin Desruisseaux
since:
   2.0

Inner Class :public static class Delta extends Statistics


Constructor Summary
public  Statistics()
     Construct an initially empty set of statistics.

Method Summary
public  voidadd(double sample)
     Update statistics for the specified sample.
public  voidadd(long sample)
     Update statistics for the specified sample.
public  voidadd(Statistics stats)
     Update statistics with all samples from the specified stats .
public  Objectclone()
     Returns a clone of this statistics.
public  intcount()
     Returns the number of samples, excluding Double.NaN NaN values.
public  intcountNaN()
     Returns the number of Double.NaN NaN samples.
public  booleanequals(Object obj)
     Test this statistics with the specified object for equality.
public  inthashCode()
     Returns a hash code value for this statistics.
public  doublemaximum()
     Returns the maximum sample value, or Double.NaN NaN if none.
public  doublemean()
     Returns the mean value, or Double.NaN NaN if none.
public  doubleminimum()
     Returns the minimum sample value, or Double.NaN NaN if none.
public  doublerange()
     Returns the range of sample values.
public  voidreset()
     Reset the statistics to their initial Double.NaN NaN values.
public  doublerms()
     Returns the root mean square, or Double.NaN NaN if none.
public  doublestandardDeviation(boolean allPopulation)
     Retourne l'écart type des échantillons par rapport à la moyenne.
final public  StringtoString()
     Returns a string representation of this statistics.
public  StringtoString(Locale locale, boolean tabulations)
     Returns a localized string representation of this statistics.


Constructor Detail
Statistics
public Statistics()(Code)
Construct an initially empty set of statistics. All statistical values are initialized to Double.NaN .




Method Detail
add
public void add(double sample)(Code)
Update statistics for the specified sample. This add method is usually invoked inside a for loop.
Parameters:
  sample - The sample value. Double.NaN NaN values are ignored.
See Also:   Statistics.add(long)
See Also:   Statistics.add(Statistics)



add
public void add(long sample)(Code)
Update statistics for the specified sample. This add method is usually invoked inside a for loop.
Parameters:
  sample - The sample value.
See Also:   Statistics.add(double)
See Also:   Statistics.add(Statistics)



add
public void add(Statistics stats)(Code)
Update statistics with all samples from the specified stats . Invoking this method is equivalent (except for rounding errors) to invoking Statistics.add(double) add for all samples that were added to stats .
Parameters:
  stats - The statistics to be added to this , or null if none.



clone
public Object clone()(Code)
Returns a clone of this statistics.



count
public int count()(Code)
Returns the number of samples, excluding Double.NaN NaN values.



countNaN
public int countNaN()(Code)
Returns the number of Double.NaN NaN samples. NaN samples are ignored in all other statitical computation. This method count them for information purpose only.



equals
public boolean equals(Object obj)(Code)
Test this statistics with the specified object for equality.



hashCode
public int hashCode()(Code)
Returns a hash code value for this statistics.



maximum
public double maximum()(Code)
Returns the maximum sample value, or Double.NaN NaN if none.
See Also:   Statistics.minimum



mean
public double mean()(Code)
Returns the mean value, or Double.NaN NaN if none.



minimum
public double minimum()(Code)
Returns the minimum sample value, or Double.NaN NaN if none.
See Also:   Statistics.maximum



range
public double range()(Code)
Returns the range of sample values. This is equivalent to Statistics.maximum maximum - Statistics.minimum minimum , except for rounding error. If no samples were added, then returns Double.NaN NaN .
See Also:   Statistics.minimum
See Also:   Statistics.maximum



reset
public void reset()(Code)
Reset the statistics to their initial Double.NaN NaN values. This method reset this object state as if it was just created.



rms
public double rms()(Code)
Returns the root mean square, or Double.NaN NaN if none.



standardDeviation
public double standardDeviation(boolean allPopulation)(Code)
Retourne l'écart type des échantillons par rapport à la moyenne. Si les données fournies aux différentes méthodes add(...) se distribuent selon une loi normale, alors l'écart type est la distance de part et d'autre de la moyenne dans lequel se trouveraient environ 84% des données. Le tableau ci-dessous donne le pourcentage approximatif des données que l'on trouve de part et d'autre de la moyenne à des distances telles que 2 ou 3 fois l'écart-type.
 0.5  69.1% 
 1.0  84.2% 
 1.5  93.3% 
 2.0  97.7% 
 3.0  99.9% 

Parameters:
  allPopulation - La valeur true indique que les données fourniesaux différentes méthodes add(...) représentent l'ensemble dela polulation. La valeur false indique que ces données nereprésentent qu'un échantillon de la population, ce qui est généralement lecas. Si le nombre de données est élevé, alors les valeurs true et false donneront sensiblement les mêmes résultats.



toString
final public String toString()(Code)
Returns a string representation of this statistics. This method invokes Statistics.toString(Locale,boolean) using the default locale and spaces separator.



toString
public String toString(Locale locale, boolean tabulations)(Code)
Returns a localized string representation of this statistics. This string will span multiple lines, one for each statistical value. For example:
 Compte:      8726
 Minimum:    6.853
 Maximum:    8.259
 Moyenne:    7.421
 RMS:        7.846
 Écart-type: 6.489
 
If tabulations is true, then labels (e.g. "Minimum") and values (e.g. "6.853") are separated by tabulations. Otherwise, they are separated by spaces.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.