Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Mean: double; overload; | Mean value. |
| └ indexed: function Mean(Index, Len: integer): double; overload; | ||
| 2 | procedure Mean(out AMean: TCplx); overload; | Same as clVector.Meanc. |
| └ indexed: procedure Mean(out AMean: TCplx; Index, Len: integer); overload; | ||
| 3 | procedure Mean(out AMean: double; Index, Len: integer); overload; | Calculate the mean value from calling object elements [Index]..[Index+Len-1]. |
Overload 1: function Mean: double; overload;
Mean value.
Returns: double
Calculate the mean value of all calling object elements. The result is a real value. An exception is raised if calling object clVector.Complex property is true.
var a: clVector;
b: double;
begin
a.CopyFromArray(TDoubleArray.Create(1,2,3,4));
b := a.Mean; // b = 2.5
end;
Indexed: function Mean(Index, Len: integer): double; overload;
Returns real mean value from 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 clVector.Complex property is true or array borders are overrun.
Overload 2: procedure Mean(out AMean: TCplx); overload;
Same as clVector.Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx | pre-computed mean |
Result: stored in self (calling object)
Indexed: procedure Mean(out AMean: TCplx; Index, Len: integer); overload;
Same as clVector.Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx | pre-computed mean |
| 2 | Index | integer | start index |
| 3 | Len | integer | element count |
Result: stored in self (calling object)
Overload 3: procedure Mean(out AMean: double; Index, Len: integer); overload;
Calculate the mean value from 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 |
Result: stored in self (calling object)
The result AMean is a real value. An exception is raised if calling object clVector.Complex property is true or array borders are overrun/underrun.