Class Persistent<U extends org.djunits.unit.Unit<U>,T extends org.djunits.value.vdouble.scalar.base.DoubleScalarRel<U,T>,W extends Number>
java.lang.Object
org.opentrafficsim.kpi.sampling.indicator.Persistent<U,T,W>
- Type Parameters:
U
- unit of the valueT
- class of the valueW
- weight class
public class Persistent<U extends org.djunits.unit.Unit<U>,T extends org.djunits.value.vdouble.scalar.base.DoubleScalarRel<U,T>,W extends Number>
extends Object
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a value with given weight to the persistent.Persistent<U,
T, W> copy()
Creates a copy.getConfidenceInterval
(double alpha) getConfidenceInterval
(double alpha, IntervalSide side) getMax()
getMean()
getMin()
long
getN()
getStDev()
getSum()
double
toString()
-
Constructor Details
-
Persistent
Constructor.- Parameters:
displayUnit
- U; unit used for displaying the persistent values, minimum, maximum, mean, etc.
-
-
Method Details
-
copy
Creates a copy.- Returns:
- a copy
-
addValue
Adds a value with given weight to the persistent.- Parameters:
value
- T; the valueweight
- W; the weight
-
getConfidenceInterval
- Parameters:
alpha
- double; confidence level- Returns:
- both-side confidence interval
-
getConfidenceInterval
- Parameters:
alpha
- double; confidence levelside
- IntervalSide; side of confidence interval- Returns:
- confidence interval
-
getMin
- Returns:
- min value
-
getMax
- Returns:
- max value
-
getN
public long getN()- Returns:
- number of measurments
-
getMean
- Returns:
- mean value
-
getVariance
public double getVariance()- Returns:
- variance in si
-
getStDev
- Returns:
- standard deviation
-
getSum
- Returns:
- sum
-
toString
-