|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.common.statistic.Histogram<T>
T
- the type of value@NotThreadSafe public class Histogram<T extends Number>
A representation of a histogram of values.
Nested Class Summary | |
---|---|
class |
Histogram.Bucket
Represents a bucket in a histogram. |
class |
Histogram.BucketingStrategy
|
class |
Histogram.DefaultBucketingStrategy
|
class |
Histogram.ExplicitBucketingStrategy
|
class |
Histogram.StandardDeviationBucketingStrategy
|
Field Summary | |
---|---|
static int |
DEFAULT_BUCKET_COUNT
|
static int |
DEFAULT_SIGNIFICANT_FIGURES
|
Constructor Summary | |
---|---|
Histogram(MathOperations<T> operations,
List<T> values)
|
|
Histogram(MathOperations<T> operations,
T... values)
|
Method Summary | |
---|---|
int |
getBucketCount()
Return the number of buckets in this histogram. |
List<Histogram.Bucket> |
getBuckets()
Get the buckets in this histogram. |
MathOperations<T> |
getMathOperations()
|
int |
getSignificantFigures()
|
Histogram.BucketingStrategy |
getStrategy()
|
List<String> |
getTextGraph(int maxBarLength)
Generate a textual (horizontal) bar graph of this histogram. |
long |
getTotalNumberOfValues()
Return the total number of values that have gone into this histogram. |
Histogram<T> |
setBucketCount(int count)
Set the number of buckets that this histogram will use. |
Histogram<T> |
setSignificantFigures(int significantFigures)
Set the number of significant figures used in the calculation of the bucket widths. |
void |
setStrategy(double median,
double standardDeviation,
int sigma)
Set the histogram to use the standard deviation to determine the bucket sizes. |
void |
setStrategy(T minimum,
T maximum)
Set the histogram to use the supplied minimum and maximum values to determine the bucket size. |
void |
setStrategyToDefault()
Set the histogram to use the actual minimum and maximum values to determine the bucket sizes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_BUCKET_COUNT
public static final int DEFAULT_SIGNIFICANT_FIGURES
Constructor Detail |
---|
public Histogram(MathOperations<T> operations, List<T> values)
public Histogram(MathOperations<T> operations, T... values)
Method Detail |
---|
public Histogram.BucketingStrategy getStrategy()
public MathOperations<T> getMathOperations()
public void setStrategy(double median, double standardDeviation, int sigma)
median
- standardDeviation
- sigma
- public void setStrategy(T minimum, T maximum)
minimum
- maximum
- public void setStrategyToDefault()
public int getSignificantFigures()
public Histogram<T> setSignificantFigures(int significantFigures)
significantFigures
- the number of significant figures for the bucket widths
DEFAULT_SIGNIFICANT_FIGURES
public int getBucketCount()
public Histogram<T> setBucketCount(int count)
count
- the number of buckets
DEFAULT_BUCKET_COUNT
public List<Histogram.Bucket> getBuckets()
public long getTotalNumberOfValues()
Histogram.Bucket.getPercentageOfValues()
public List<String> getTextGraph(int maxBarLength)
maxBarLength
- the maximum bar length, or 0 if the bar length is to represent actual counts
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |