Variance instance. The isBiasCorrected property of the
wrapped Variance instance is exposed, so that this class can be used to
compute both the "sample standard deviation" (the square root of the
bias-corrected "sample variance") or the "population standard deviation"
(the square root of the non-bias-corrected "population variance"). See
Variance for more information.
Note that this implementation is not synchronized. If
multiple threads access an instance of this class concurrently, and at least
one of the threads invokes the increment() or
clear() method, it must be synchronized externally.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Serializable version identifier |
| private Variance | variance
Wrapped Variance instance |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StandardDeviation(final SecondMoment
the external moment m2)Constructs a StandardDeviation from an external second moment. |
| public | StandardDeviation(StandardDeviation
the original)StandardDeviation instance to copyCopy constructor, creates a new |
| public | StandardDeviation(boolean
whether or not the variance computation will use
the bias-corrected formula isBiasCorrected)Contructs a StandardDeviation with the specified value for the
|
| public | StandardDeviation(boolean
whether or not the variance computation will use
the bias-corrected formula isBiasCorrected, SecondMoment the external moment m2)Contructs a StandardDeviation with the specified value for the
|
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Implements abstract org. Implements org. Clears the internal state of the Statistic |
| public StandardDeviation | copy()
Implements abstract org. Implements org. Returns a copy of the statistic with the same internal state. |
| public static void | copy(StandardDeviation
StandardDeviation to copy source, StandardDeviation StandardDeviation to copy to dest)Copies source to dest. |
| public double | Returns: the standard deviation of the values or Double.NaN if length = 0the input array values)Overrides org. Implements org. Returns the Standard Deviation of the entries in the input array, or
|
| public double | Returns: the standard deviation of the values or Double.NaN if length = 0the input array values, final int index of the first array element to include begin, final int the number of elements to include length)Overrides org. Implements org. Returns the Standard Deviation of the entries in the specified portion of
the input array, or |
| public double | Returns: the standard deviation of the values or Double.NaN if length = 0the input array values, final double the precomputed mean value mean, final int index of the first array element to include begin, final int the number of elements to include length)Returns the Standard Deviation of the entries in the specified portion of the input array, using the precomputed mean value. |
| public double | Returns: the standard deviation of the values or Double.NaN if length = 0the input array values, final double the precomputed mean value mean)Returns the Standard Deviation of the entries in the input array, using the precomputed mean value. |
| public long | getN()
Implements org. Returns the number of values that have been added. |
| public double | getResult()
Implements abstract org. Implements org. Returns the current value of the Statistic. |
| public void | increment(final double
the new value. d)Implements abstract org. Implements org. Updates the internal state of the statistic to reflect the addition of the new value. |
| public boolean | |
| public void |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version identifier | |
| variance | back to summary |
|---|---|
| private Variance variance Wrapped Variance instance | |
| StandardDeviation | back to summary |
|---|---|
| public StandardDeviation() Constructs a StandardDeviation. Sets the underlying | |
| StandardDeviation | back to summary |
|---|---|
| public StandardDeviation(final SecondMoment m2) Constructs a StandardDeviation from an external second moment.
| |
| StandardDeviation | back to summary |
|---|---|
| public StandardDeviation(StandardDeviation original) throws NullArgumentException Copy constructor, creates a new
| |
| StandardDeviation | back to summary |
|---|---|
| public StandardDeviation(boolean isBiasCorrected) Contructs a StandardDeviation with the specified value for the
| |
| StandardDeviation | back to summary |
|---|---|
| public StandardDeviation(boolean isBiasCorrected, SecondMoment m2) Contructs a StandardDeviation with the specified value for the
| |
| clear | back to summary |
|---|---|
| public void clear() Implements abstract org. Implements org. Doc from org. Clears the internal state of the Statistic
| |
| copy | back to summary |
|---|---|
| public StandardDeviation copy() Implements abstract org. Implements org. Doc from org. Returns a copy of the statistic with the same internal state.
| |
| copy | back to summary |
|---|---|
| public static void copy(StandardDeviation source, StandardDeviation dest) throws NullArgumentException Copies source to dest. Neither source nor dest can be null.
| |
| evaluate | back to summary |
|---|---|
| public double evaluate(final double[] values) throws MathIllegalArgumentException Overrides org. Implements org. Returns the Standard Deviation of the entries in the input array, or
Returns 0 for a single-value (i.e. length = 1) sample.
Throws Does not change the internal state of the statistic.
| |
| evaluate | back to summary |
|---|---|
| public double evaluate(final double[] values, final int begin, final int length) throws MathIllegalArgumentException Overrides org. Implements org. Returns the Standard Deviation of the entries in the specified portion of
the input array, or Returns 0 for a single-value (i.e. length = 1) sample.
Throws Does not change the internal state of the statistic.
| |
| evaluate | back to summary |
|---|---|
| public double evaluate(final double[] values, final double mean, final int begin, final int length) throws MathIllegalArgumentException Returns the Standard Deviation of the entries in the specified portion of
the input array, using the precomputed mean value. Returns
Returns 0 for a single-value (i.e. length = 1) sample. The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed.
Throws Does not change the internal state of the statistic.
| |
| evaluate | back to summary |
|---|---|
| public double evaluate(final double[] values, final double mean) throws MathIllegalArgumentException Returns the Standard Deviation of the entries in the input array, using
the precomputed mean value. Returns
Returns 0 for a single-value (i.e. length = 1) sample. The formula used assumes that the supplied mean value is the arithmetic mean of the sample data, not a known population parameter. This method is supplied only to save computation when the mean has already been computed.
Throws Does not change the internal state of the statistic.
| |
| getN | back to summary |
|---|---|
| public long getN() Implements org. Doc from org. Returns the number of values that have been added.
| |
| getResult | back to summary |
|---|---|
| public double getResult() Implements abstract org. Implements org. Doc from org. Returns the current value of the Statistic.
| |
| increment | back to summary |
|---|---|
| public void increment(final double d) Implements abstract org. Implements org. Doc from org. Updates the internal state of the statistic to reflect the addition of the new value.
| |
| isBiasCorrected | back to summary |
|---|---|
public boolean isBiasCorrected()
| |
| setBiasCorrected | back to summary |
|---|---|
public void setBiasCorrected(boolean isBiasCorrected)
| |