TSparseMtx.StdDev Method

Overload List

#SignatureDescription
1function StdDev: double; overload;Standard deviation.
└ indexed: function StdDev(Index,Len: integer): double; overload;
2function StdDev(const AMean: TCplx): TCplx; overload;Returns the standard deviation of all calling object complex elements.
└ indexed: function StdDev(const AMean: TCplx; Index, Len: integer): TCplx; overload;
3function StdDev(const AMean: double): double; overload;Returns the standard deviation of all calling object elements.
└ indexed: function StdDev(const AMean: double; Index, Len: integer): double; overload;

Overload 1: function StdDev: double; overload;

Standard deviation.

Returns: double

Remarks:

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

Examples
var a: Matrix;
    c: double;
    aMean: double;
begin
    a := [[1,2],[3,4]];
    aMean := a.Mean;
    c := a.StdDev(aMean); //if both Mean and StdDev are required this is faster
    // c := a.StdDev; //this is an alternative.
end;

Indexed: function StdDev(Index,Len: integer): double; overload;

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

#NameTypeDescription
1Indexintegerstart index
2Lenintegerelement count

Returns: double

Remarks:

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

Overload 2: function StdDev(const AMean: TCplx): TCplx; overload;

Returns the standard deviation of all calling object complex elements.

#NameTypeDescription
1AMeanTCplxpre-computed mean

Returns: TCplx (complex)

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object TMtxVec.Complex property is false.

Indexed: function StdDev(const AMean: TCplx; Index, Len: integer): TCplx; overload;

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

#NameTypeDescription
1AMeanTCplxpre-computed mean
2Indexintegerstart index
3Lenintegerelement count

Returns: TCplx (complex)

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object TMtxVec.Complex property is false or if array borders are overrun/underrun.

Overload 3: function StdDev(const AMean: double): double; overload;

Returns the standard deviation of all calling object elements.

#NameTypeDescription
1AMeandoublepre-computed mean

Returns: double

Remarks:

The average of all calling object elements must be passed as a AMean parameter. An exception is raised if calling object TMtxVec.Complex property is true.

Indexed: function StdDev(const AMean: double; Index, Len: integer): double; overload;

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

#NameTypeDescription
1AMeandoublepre-computed mean
2Indexintegerstart index
3Lenintegerelement count

Returns: double

Remarks:

The average of the coresponding elements must be passed as a parameter. An exception is raised if calling object TMtxVec.Complex property is true or if array borders are overrun/underrun.