avrora.util.profiling
Class MinMaxMean

java.lang.Object
  extended byavrora.util.profiling.DataItem
      extended byavrora.util.profiling.MinMaxMean
Direct Known Subclasses:
Distribution

public class MinMaxMean
extends DataItem

This models the min, max, mean, accumulation, total, and number of occurrences of min and max in a stream of integers.


Field Summary
 int accumulation
           
 int countMaximum
           
 int countMinimum
           
protected  java.lang.String cumulname
           
 float mean
           
 int observedMaximum
           
 int observedMinimum
           
protected  boolean someData
           
 int total
           
protected  java.lang.String totalname
           
 
Fields inherited from class avrora.util.profiling.DataItem
name
 
Constructor Summary
MinMaxMean(java.lang.String newname)
          Public constructor initializes the statistics for a sequence of integers.
MinMaxMean(java.lang.String newname, java.lang.String tn, java.lang.String cn)
          Public constructor initializes the statistics for a sequence of integers.
 
Method Summary
 boolean hasData()
           
 MinMaxMean merge(MinMaxMean m)
          Merge the results of two MinMaxMean objects into one.
 void processData()
          process the data so far and update internal statistics.
 void record(int value)
          Update the statistical data for the next input value.
 void textReport()
          Generate a textual report of the data gathered.
 java.lang.String toString()
           
 
Methods inherited from class avrora.util.profiling.DataItem
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mean

public float mean

observedMaximum

public int observedMaximum

observedMinimum

public int observedMinimum

countMinimum

public int countMinimum

countMaximum

public int countMaximum

total

public int total

accumulation

public int accumulation

someData

protected boolean someData

totalname

protected java.lang.String totalname

cumulname

protected java.lang.String cumulname
Constructor Detail

MinMaxMean

public MinMaxMean(java.lang.String newname)
Public constructor initializes the statistics for a sequence of integers.


MinMaxMean

public MinMaxMean(java.lang.String newname,
                  java.lang.String tn,
                  java.lang.String cn)
Public constructor initializes the statistics for a sequence of integers.

Method Detail

record

public void record(int value)
Update the statistical data for the next input value.


processData

public void processData()
process the data so far and update internal statistics.

Specified by:
processData in class DataItem

textReport

public void textReport()
Generate a textual report of the data gathered.

Specified by:
textReport in class DataItem

merge

public MinMaxMean merge(MinMaxMean m)
Merge the results of two MinMaxMean objects into one.


hasData

public boolean hasData()
Specified by:
hasData in class DataItem

toString

public java.lang.String toString()
Overrides:
toString in class DataItem