public class RunningStatistics
extends java.lang.Object
implements galileo.serialization.ByteSerializable
Modifier and Type | Class and Description |
---|---|
static class |
RunningStatistics.WelchResult |
Constructor and Description |
---|
RunningStatistics()
Creates a Welford running statistics instance without no observed values.
|
RunningStatistics(double... samples)
Creates a Welford running statistics instance with an array of samples.
|
RunningStatistics(RunningStatistics... others)
Create a new
RunningStatistics instance by combining multiple
existing instances. |
RunningStatistics(RunningStatistics that)
Creates a copy of a
RunningStatistics instance. |
RunningStatistics(galileo.serialization.SerializationInputStream in) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all values passed in, returning the RunningStatistics instance to
its original state.
|
double |
max()
Retrieves the largest value seen thus far by this RunningStatistics
instance.
|
double |
mean()
Calculates the current running mean for the values observed thus far.
|
void |
merge(RunningStatistics that) |
double |
min()
Retrieves the smallest value seen thus far by this RunningStatistics
instance.
|
long |
n()
Retrieves the number of samples submitted to the RunningStatistics
instance so far.
|
double |
popStd()
Calculates the sample standard deviation of the data observed thus
far.
|
double |
popVar()
Calculates the population variance.
|
double |
prob(double sample) |
void |
put(double... samples)
Add multiple new samples to the running statistics.
|
void |
put(double sample)
Add a new sample to the running statistics.
|
void |
remove(double sample)
Removes a previously-added sample from the running statistics.
|
void |
serialize(galileo.serialization.SerializationOutputStream out) |
double |
std()
Calculates the standard deviation of the data observed thus far.
|
double |
std(double ddof)
Calculates the standard deviation of the values observed thus far, given
a bias adjustment.
|
java.lang.String |
toString() |
double |
var()
Calculates the running sample variance.
|
double |
var(double ddof)
Calculates the running variance, given a bias adjustment.
|
static RunningStatistics.WelchResult |
welchT(RunningStatistics rs1,
RunningStatistics rs2) |
public RunningStatistics()
public RunningStatistics(RunningStatistics that)
RunningStatistics
instance.public RunningStatistics(RunningStatistics... others)
RunningStatistics
instance by combining multiple
existing instances.public RunningStatistics(double... samples)
@ByteSerializable.Deserialize public RunningStatistics(galileo.serialization.SerializationInputStream in) throws java.io.IOException
java.io.IOException
public void merge(RunningStatistics that)
public void put(double... samples)
public void put(double sample)
public void remove(double sample)
public void clear()
public double mean()
public double var()
public double popVar()
public double var(double ddof)
ddof
- delta degrees-of-freedom to use in the calculation. Use 1.0
for the sample variance.public double std()
public double popStd()
public double std(double ddof)
ddof
- delta degrees-of-freedom to use in the calculation.public double max()
public double min()
public double prob(double sample)
public long n()
public static RunningStatistics.WelchResult welchT(RunningStatistics rs1, RunningStatistics rs2)
public java.lang.String toString()
toString
in class java.lang.Object
public void serialize(galileo.serialization.SerializationOutputStream out) throws java.io.IOException
serialize
in interface galileo.serialization.ByteSerializable
java.io.IOException