Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function StdDev: Double; | Standard deviation. |
| └ indexed: function StdDev(Index: Integer; Len: Integer): Double; | ||
| 2 | function StdDev(const AMean: TCplx): TCplx; | Returns the standard deviation of all calling object complex elements. |
| └ indexed: function StdDev(const AMean: TCplx; Index: Integer; Len: Integer): TCplx; | ||
| 3 | function StdDev(const AMean: Double): Double; | Returns the standard deviation of all calling object elements. |
| └ indexed: function StdDev(const AMean: Double; Index: Integer; Len: Integer): Double; |
Overload 1: function StdDev: Double;
Standard deviation.
Returns: Double
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.
var a: Matrix;
c: double;
aMean: double;
begin
a.SetIt(2,2,False,[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;
var
a: Matrix;
result: double;
begin
a := [[1.0, 2.0], [3.0, 4.0]];
result := a.StdDev;
if Abs(result - 1.29099444873581) > 1e-10 then
raise Exception.Create('Matrix.StdDev: expected 1.29099444873581, got ' + result.ToString);
end;
Indexed: function StdDev(Index: Integer; Len: Integer): Double;
Returns the standard deviation of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Integer | start index |
| 2 | Len | Integer | element count |
Returns: Double
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;
Returns the standard deviation of all calling object complex elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx | pre-computed mean |
Returns: TCplx (complex)
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: Integer; Len: Integer): TCplx;
Returns the standard deviation of calling object complex elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx | pre-computed mean |
| 2 | Index | Integer | start index |
| 3 | Len | Integer | element count |
Returns: TCplx (complex)
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;
Returns the standard deviation of all calling object elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | Double | pre-computed mean |
Returns: Double
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: Integer; Len: Integer): Double;
Returns the standard deviation of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | Double | pre-computed mean |
| 2 | Index | Integer | start index |
| 3 | Len | Integer | element count |
Returns: Double
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.