|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.jstats.statistics.StatisticsObject
nl.tudelft.simulation.jstats.statistics.Tally
public class Tally
The Tally class defines a statistics event tally.
(c) copyright 2002-2005-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
Field Summary | |
---|---|
static short |
BOTH_SIDE_CONFIDENCE
BOTH_SIDE_CONFIDENCE refers to both sides of the confidence |
protected String |
description
description refers to the description of this tally |
static short |
LEFT_SIDE_CONFIDENCE
LEFT_SIDE_CONFIDENCE refers to the left side confidence |
protected double |
max
maxrefers to the max of the tally |
static EventType |
MAX_EVENT
MAX_EVENT is fired whenever a new maximum value has reached |
protected double |
min
min refers to the min of the tally |
static EventType |
MIN_EVENT
MIN_EVENT is fired whenever a new minimum value has reached |
protected long |
n
n refers to the number of measurements |
static EventType |
N_EVENT
N_EVENT is fired whenever on a change in measurements |
static short |
RIGTH_SIDE_CONFIDENCE
RIGTH_SIDE_CONFIDENCE refers to the right side confidence |
static EventType |
SAMPLE_MEAN_EVENT
SAMPLE_MEAN_EVENT is fired whenever the sample mean is updated |
static EventType |
SAMPLE_VARIANCE_EVENT
SAMPLE_VARIANCE_EVENT is fired whenever the sample variance is updated |
protected double |
sampleMean
sampleMean refers to the mean of the tally |
protected Object |
semaphore
the semaphore |
static EventType |
STANDARD_DEVIATION_EVENT
STANDARD_DEVIATION_EVENT is fired whenever the standard deviation is updated |
protected double |
sum
sum refers to the sum of the tally |
static EventType |
SUM_EVENT
SUM_EVENT is fired whenever the sum sis updated |
protected double |
varianceSum
varianceSum refers to the varianceSum of the tally |
Fields inherited from class nl.tudelft.simulation.jstats.statistics.StatisticsObject |
---|
filter |
Fields inherited from class nl.tudelft.simulation.event.EventProducer |
---|
listeners |
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface |
---|
FIRST_POSITION, LAST_POSITION |
Constructor Summary | |
---|---|
Tally(String description)
Constructs a new Tally |
Method Summary | |
---|---|
double[] |
getConfidenceInterval(double alpha)
returns the confidence interval on either side of the mean |
double[] |
getConfidenceInterval(double alpha,
short side)
returns the confidence interval based of the mean |
String |
getDescription()
returns the description of this tally |
double |
getMax()
Returns the max. |
double |
getMin()
Returns the min. |
long |
getN()
Returns the number of observations |
double |
getSampleMean()
Returns the sampleMean of all oberservations since the initialization |
double |
getSampleVariance()
Returns the current tally variance |
double |
getStdDev()
Returns the current tally standard deviation |
double |
getSum()
returns the sum of the values of the observations |
TableModel |
getTable()
represents the statistics object as Table. |
void |
initialize()
initializes the Tally. |
boolean |
isInitialized()
is this tally initialized? |
void |
notify(EventInterface event)
|
void |
setFilter(Filterinterface filter)
sets the Filter on this tally |
protected double |
setMax(double max)
sets max |
protected double |
setMin(double min)
sets min |
protected long |
setN(long n)
sets n |
protected double |
setSampleMean(double sampleMean)
sets sampleMean |
protected double |
setSum(double sum)
sets the count |
String |
toString()
|
Methods inherited from class nl.tudelft.simulation.jstats.statistics.StatisticsObject |
---|
getSwingPanel |
Methods inherited from class nl.tudelft.simulation.event.EventProducer |
---|
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final EventType SAMPLE_MEAN_EVENT
public static final EventType SAMPLE_VARIANCE_EVENT
public static final EventType MIN_EVENT
public static final EventType MAX_EVENT
public static final EventType N_EVENT
public static final EventType STANDARD_DEVIATION_EVENT
public static final EventType SUM_EVENT
public static final short LEFT_SIDE_CONFIDENCE
public static final short BOTH_SIDE_CONFIDENCE
public static final short RIGTH_SIDE_CONFIDENCE
protected double sum
protected double min
protected double max
protected double sampleMean
protected double varianceSum
protected long n
protected String description
protected Object semaphore
Constructor Detail |
---|
public Tally(String description)
description
- the description of this tallyMethod Detail |
---|
public void setFilter(Filterinterface filter)
filter
- the filter.public double getSampleMean()
public double[] getConfidenceInterval(double alpha)
alpha
- Alpha is the significance level used to compute the
confidence level. The confidence level equals 100*(1 - alpha)%, or
in other words, an alpha of 0.05 indicates a 95 percent confidence
level.
public double[] getConfidenceInterval(double alpha, short side)
alpha
- Alpha is the significance level used to compute the
confidence level. The confidence level equals 100*(1 - alpha)%, or
in other words, an alpha of 0.05 indicates a 95 percent confidence
level.side
- the side of the confidence interval with respect to the mean
public String getDescription()
public double getMax()
public double getMin()
public long getN()
public double getStdDev()
public double getSum()
public double getSampleVariance()
public TableModel getTable()
StatisticsObject
getTable
in class StatisticsObject
StatisticsObject.getTable()
public void initialize()
public boolean isInitialized()
public void notify(EventInterface event)
notify
in interface EventListenerInterface
#notify(nl.tudelft.simulation.event.EventInterface)
public String toString()
toString
in class Object
Object.toString()
protected double setSampleMean(double sampleMean)
sampleMean
- the new mean
protected double setMin(double min)
min
- the new minimum value
protected double setMax(double max)
max
- the new maximum value
protected long setN(long n)
n
- the new n
protected double setSum(double sum)
sum
- the new sum
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |