Class EventBasedTally
java.lang.Object
org.djutils.stats.summarizers.Tally
org.djutils.stats.summarizers.event.EventBasedTally
- All Implemented Interfaces:
EventListener,EventListener,EventProducer,Statistic,TallyStatistic
The EventBasedTally class registers a series of values and provides mean, standard deviation, etc. of the registered values.
It embeds an EventProducer so it can keep listeners informed about new observations, and it listens to external events to be
able to receive observations, in addition to the register(...) method.
Copyright (c) 2002-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
for project information https://simulation.tudelft.nl. The DSOL
project is distributed under a three-clause BSD-style license, which can be found at
https://simulation.tudelft.nl/dsol/3.0/license.html.
- Author:
- Alexander Verbraeck, Peter Jacobs , Peter Knoppers
-
Field Summary
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION -
Constructor Summary
ConstructorsConstructorDescriptionEventBasedTally(String description) Convenience constructor that uses a NoStorageAccumulator to estimate quantiles.EventBasedTally(String description, EventProducer eventProducer) Construct a new EventBasedCounter with a specific EventProducer, e.g. a remote one.EventBasedTally(String description, QuantileAccumulator quantileAccumulator) Constructs a new EventBasedTally.EventBasedTally(String description, QuantileAccumulator quantileAccumulator, EventProducer eventProducer) Construct a new EventBasedCounter with a specific EventProducer, e.g. a remote one. -
Method Summary
Methods inherited from class org.djutils.stats.summarizers.Tally
getConfidenceInterval, getConfidenceInterval, getCumulativeProbability, getDescription, getMax, getMin, getN, getPopulationExcessKurtosis, getPopulationKurtosis, getPopulationMean, getPopulationSkewness, getPopulationStDev, getPopulationVariance, getQuantile, getSampleExcessKurtosis, getSampleKurtosis, getSampleMean, getSampleSkewness, getSampleStDev, getSampleVariance, getSum, register, reportFooter, reportHeader, reportLine, setDescriptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListenerMethods inherited from interface org.djutils.stats.summarizers.Statistic
formatFixed
-
Constructor Details
-
EventBasedTally
Constructs a new EventBasedTally.- Parameters:
description- the description of this tallyquantileAccumulator- the input series accumulator that can approximate or compute quantiles.
-
EventBasedTally
Convenience constructor that uses a NoStorageAccumulator to estimate quantiles.- Parameters:
description- the description of this tally
-
EventBasedTally
Construct a new EventBasedCounter with a specific EventProducer, e.g. a remote one. The Tally uses uses a NoStorageAccumulator to estimate quantiles.- Parameters:
description- the description for this countereventProducer- the EventProducer to embed and use in this statistic
-
EventBasedTally
public EventBasedTally(String description, QuantileAccumulator quantileAccumulator, EventProducer eventProducer) Construct a new EventBasedCounter with a specific EventProducer, e.g. a remote one.- Parameters:
description- the description for this counterquantileAccumulator- the input series accumulator that can approximate or compute quantiles.eventProducer- the EventProducer to embed and use in this statistic
-
-
Method Details
-
getEventListenerMap
- Specified by:
getEventListenerMapin interfaceEventProducer
-
initialize
public void initialize()Description copied from interface:StatisticInitialize the statistic.- Specified by:
initializein interfaceStatistic- Overrides:
initializein classTally
-
notify
- Specified by:
notifyin interfaceEventListener
-
register
public double register(double value) Description copied from class:TallyProcess one observed value. -
fireEvents
protected void fireEvents()Method that can be overridden to fire own events or additional events when registering an observation. -
toString
-