public final class DoubleWeightedMean extends org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic implements Serializable
A weighted mean implementation for floating-point weights, following the Commons Math3 framework.
This class is not thread-safe.
Constructor and Description |
---|
DoubleWeightedMean() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
DoubleWeightedMean |
copy() |
boolean |
equals(Object o) |
long |
getN() |
double |
getResult() |
int |
hashCode() |
void |
increment(double datum) |
void |
increment(double datum,
double weight) |
String |
toString() |
evaluate, evaluate, incrementAll, incrementAll
public DoubleWeightedMean copy()
copy
in interface org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic
copy
in interface org.apache.commons.math3.stat.descriptive.UnivariateStatistic
copy
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
public void clear()
clear
in interface org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic
clear
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
public double getResult()
getResult
in interface org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic
getResult
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
public long getN()
getN
in interface org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic
public void increment(double datum)
increment
in interface org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic
increment
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
datum
- new datum to add to the mean, with weight 1public void increment(double datum, double weight)
datum
- new datum to add to the meanweight
- weight of the new datumpublic int hashCode()
hashCode
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
public boolean equals(Object o)
equals
in class org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic
Copyright © 2014–2018. All rights reserved.