TOpenCLVector.StdDev Method

Overload List

#SignatureDescription
1function StdDev: Double;Standard deviation.
└ indexed: function StdDev(Index: Integer; Len: Integer): Double;
2function StdDev(ASum: Double; aSumSqr: Double): Double;Returns the standard deviation of all calling object elements.
└ indexed: function StdDev(ASum: Double; aSumSqr: Double; Index: Integer; Len: Integer): Double;

Overload 1: function StdDev: Double;

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 TOpenCLBase.Complex property is true.

Examples
var a: clVector;
    c: double;
    aMean: double;
begin
    a.CopyFromArray(TDoubleArray.Create(1,2,3,4));
    Caption := FloatToSTr(a.StdDev);
end;

Indexed: function StdDev(Index: Integer; Len: Integer): Double;

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 TOpenCLBase.Complex property is true or if array borders are overrun/underrun.

Overload 2: function StdDev(ASum: Double; aSumSqr: Double): Double;

Returns the standard deviation of all calling object elements.

#NameTypeDescription
1ASumDoubleoutput sum
2aSumSqrDoublescalar

Returns: Double

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 TOpenCLBase.Complex property is true.

Indexed: function StdDev(ASum: Double; aSumSqr: Double; Index: Integer; Len: Integer): Double;

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

#NameTypeDescription
1ASumDoubleoutput sum
2aSumSqrDoublescalar
3IndexIntegerstart index
4LenIntegerelement count

Returns: Double

Remarks:

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