clVector::StdDev Method

Overload List

#SignatureDescription
1double StdDev() const;Standard deviation.
2double StdDev(int Index, int Len) const;Returns the standard deviation of calling object elements [Index]..[Index+Len-1].
3double StdDev(double ASum, double aSumSqr) const;Returns the standard deviation of all calling object elements.
4double StdDev(double ASum, double aSumSqr, int Index, int Len) const;Returns the standard deviation of calling object elements [Index]..[Index+Len-1].

Overload 1: double StdDev() const;

Standard deviation.

Remarks:

Calculate the standard deviation of all calling object elements. The result is a real value. An exception is raised if calling vector clVector::Complex property is true.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clVector a;
    double c;
    double aMean;

    a.CopyFromArray(DewArray<double>{1, 2, 3, 4});
    c = a.StdDev();
}
See Also: clVector::Mean
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 2: double StdDev(int Index, int Len) const;

Returns the standard deviation of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1Indexint
2Lenint
Remarks:

An exception is raised if calling object clVector::Complex property is true or if array borders are overrun/underrun.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 3: double StdDev(double ASum, double aSumSqr) const;

Returns the standard deviation of all calling object elements.

#NameTypeDescription
1ASumdouble
2aSumSqrdouble
Remarks:

The sum and the sum of squares of all calling object elements must be passed as parameters. An exception is raised if calling object clVector::Complex property is true.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 4: double StdDev(double ASum, double aSumSqr, int Index, int Len) const;

Returns the standard deviation of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1ASumdouble
2aSumSqrdouble
3Indexint
4Lenint
Remarks:

The sum and the sum of squares of the coresponding elements must be passed as parameters. An exception is raised if calling object clVector::Complex property is true or if array borders are overrun/underrun.

Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler