Class StatefulTimeseriesDistribution
- java.lang.Object
-
- org.apache.commons.math3.distribution.AbstractRealDistribution
-
- org.processmining.plugins.stochasticpetrinet.distribution.AnotherAbstractRealDistribution
-
- org.processmining.plugins.stochasticpetrinet.distribution.timeseries.StatefulTimeseriesDistribution
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.commons.math3.analysis.UnivariateFunction,org.apache.commons.math3.distribution.RealDistribution
- Direct Known Subclasses:
ARMATimeSeries,SinusoidalSeries
public abstract class StatefulTimeseriesDistribution extends AnotherAbstractRealDistribution
This is a "stateful" distribution that knows it's current time. Depending on its time, it has a value which is determined by the subclass (e.g.SinusoidalSeries)BEWARE: the class creating samples needs to update the current state to the sampling timestamp!
- Author:
- Andreas Rogge-Solti
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.math3.distribution.RealDistributionnoiseDistributionprotected booleanonlyPositive-
Fields inherited from class org.processmining.plugins.stochasticpetrinet.distribution.AnotherAbstractRealDistribution
cachedMean, cachedVariance
-
-
Constructor Summary
Constructors Constructor Description StatefulTimeseriesDistribution(double noiseStandardDeviation)StatefulTimeseriesDistribution(org.apache.commons.math3.distribution.RealDistribution noiseDist)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description doublecumulativeProbability(double x)doubledensity(double x)protected abstract doublegetCurrentSeriesValue(long currentTime)Sub-classes need to implement this.doublegetSupportLowerBound()doublegetSupportUpperBound()booleanisSupportConnected()booleanisSupportLowerBoundInclusive()booleanisSupportUpperBoundInclusive()doublesample()doublesample(long time)voidsetCurrentTime(long currentTime)-
Methods inherited from class org.processmining.plugins.stochasticpetrinet.distribution.AnotherAbstractRealDistribution
getNumericalMean, getNumericalVariance, value
-
-
-
-
Method Detail
-
density
public double density(double x)
-
getCurrentSeriesValue
protected abstract double getCurrentSeriesValue(long currentTime)
Sub-classes need to implement this. It returns the value of the time series model given the current time- Parameters:
currentTime- the current time as a POSIX timestamp (millis since 01-01-1970)- Returns:
- double the value of the underlying series at the given point in time.
-
getSupportLowerBound
public double getSupportLowerBound()
-
getSupportUpperBound
public double getSupportUpperBound()
-
isSupportLowerBoundInclusive
public boolean isSupportLowerBoundInclusive()
-
isSupportUpperBoundInclusive
public boolean isSupportUpperBoundInclusive()
-
isSupportConnected
public boolean isSupportConnected()
-
setCurrentTime
public void setCurrentTime(long currentTime)
-
sample
public double sample()
- Specified by:
samplein interfaceorg.apache.commons.math3.distribution.RealDistribution- Overrides:
samplein classorg.apache.commons.math3.distribution.AbstractRealDistribution
-
sample
public double sample(long time)
-
cumulativeProbability
public double cumulativeProbability(double x)
- Specified by:
cumulativeProbabilityin interfaceorg.apache.commons.math3.distribution.RealDistribution- Overrides:
cumulativeProbabilityin classAnotherAbstractRealDistribution
-
-