org.expasy.jpl.commons.collection.stat
Class StatisticalCategory
java.lang.Object
java.lang.Number
org.expasy.jpl.commons.collection.stat.StatisticalCategory
- All Implemented Interfaces:
- Serializable
public final class StatisticalCategory
- extends Number
A statistical category or class is an interval of values where data lie.
- Version:
- 1.0
- Author:
- nikitin
- See Also:
- Serialized Form
StatisticalCategory
public StatisticalCategory(HistogramDataSet histo,
Interval interval)
StatisticalCategory
public StatisticalCategory(HistogramDataSet histo,
double from,
double to)
updateFrequency
public final void updateFrequency(double weight)
- Add the given value in this category.
- Parameters:
value - the value to group in this category.
- Throws:
IllegalArgumentException - if value does not belong to this
interval.
getCenter
public final double getCenter()
- Returns:
- the center of this category.
getFrequency
public final double getFrequency()
- Returns:
- the mean number of observations in this interval.
getValues
public final double[] getValues()
- Returns:
- the observations of this interval.
doubleValue
public double doubleValue()
- Specified by:
doubleValue in class Number
floatValue
public float floatValue()
- Specified by:
floatValue in class Number
intValue
public int intValue()
- Specified by:
intValue in class Number
longValue
public long longValue()
- Specified by:
longValue in class Number
getInterval
public Interval getInterval()
- Returns:
- the class interval.
toString
public String toString()
- Overrides:
toString in class Object
Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.