Overload List
| # | Signature | Description |
|---|---|---|
| 1 | Double Mean | Mean value. |
| └ indexed: Double Mean(Int32 Index, Int32 Len) | ||
| 2 | void Mean(ref TCplx AMean) | Same as Dew.Math.TOpenCLMtxVec.Meanc. |
| └ indexed: void Mean(ref TCplx AMean, Int32 Index, Int32 Len) | ||
| 3 | void Mean(ref Double AMean, Int32 Index, Int32 Len) | Calculate the mean value from calling object elements [Index]..[Index+Len-1]. |
Overload 1: Double Mean
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 Dew.Math.TOpenCLBase.Complex property is true.
using Dew.Math;
using Dew.Math.Units;
namespace Dew.Examples
{
void Example()
{
TOpenCLVector a;
clMtxVec.CreateIt(out a);
try
{
a.CopyFromArray(new double[] {1,2,3,4});
double m = a.Mean(); // 2.5
}
finally
{
clMtxVec.FreeIt(ref a);
}
}
}
Indexed: Double Mean(Int32 Index, Int32 Len)
Returns real mean value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Returns: Double
An exception is raised if calling object Dew.Math.TOpenCLBase.Complex property is true or array borders are overrun.
Overload 2: void Mean(ref TCplx AMean)
Same as Dew.Math.TOpenCLMtxVec.Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx (ref) | pre-computed mean |
Result: stored in self (calling object)
Indexed: void Mean(ref TCplx AMean, Int32 Index, Int32 Len)
Same as Dew.Math.TOpenCLMtxVec.Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx (ref) | pre-computed mean |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
Overload 3: void Mean(ref Double AMean, Int32 Index, Int32 Len)
Calculate the mean value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | Double (ref) | pre-computed mean |
| 2 | Index | Int32 | start index |
| 3 | Len | Int32 | element count |
Result: stored in self (calling object)
The result AMean is a real value. An exception is raised if calling object Dew.Math.TOpenCLBase.Complex property is true or array borders are overrun/underrun.