![JAR search and dependency download from the Maven repository](/logo.png)
org.opentrafficsim.kpi.sampling.indicator.PersistentStatistic Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ots-kpi Show documentation
Show all versions of ots-kpi Show documentation
OpenTrafficSim KPI Module without dependencies to ots-road or ots-core
package org.opentrafficsim.kpi.sampling.indicator;
import org.djunits.unit.Unit;
import org.djunits.value.vdouble.scalar.base.AbstractDoubleScalarRel;
/**
*
* Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
* BSD-style license. See OpenTrafficSim License.
*
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Wouter Schakel
* @param the unit type
* @param type of the value
*/
public class PersistentStatistic, T extends AbstractDoubleScalarRel>
{
/** Wrapped persistent. */
private final Persistent persistent;
/**
* Constructor.
* @param persistent Persistent<?,T,?>; the persistent statistic that gathers the data
*/
public PersistentStatistic(final Persistent persistent)
{
this.persistent = persistent.copy();
}
/**
* @param alpha double; confidence level
* @return both-side confidence interval
*/
public ConfidenceInterval getConfidenceInterval(final double alpha)
{
return this.persistent.getConfidenceInterval(alpha);
}
/**
* @param alpha double; confidence level
* @param side IntervalSide; side of confidence interval
* @return confidence interval
*/
public ConfidenceInterval getConfidenceInterval(final double alpha, final IntervalSide side)
{
return this.persistent.getConfidenceInterval(alpha, side);
}
/**
* @return sum.
*/
public T getSum()
{
return this.persistent.getSum();
}
/**
* @return min.
*/
public T getMin()
{
return this.persistent.getMin();
}
/**
* @return max.
*/
public T getMax()
{
return this.persistent.getMax();
}
/**
* @return mean.
*/
public T getMean()
{
return this.persistent.getMean();
}
/**
* @return stDev.
*/
public T getStDev()
{
return this.persistent.getStDev();
}
/**
* @return variance.
*/
public double getVariance()
{
return this.persistent.getVariance();
}
/**
* @return n.
*/
public long getN()
{
return this.persistent.getN();
}
/** {@inheritDoc} */
@Override
public final String toString()
{
return "PersistentStatistic [persistent=" + this.persistent + "]";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy