TOpenCLMatrix.Mean Method

Overload List

#SignatureDescription
1Double MeanMean value.
└ indexed: Double Mean(Int32 Index, Int32 Len)
2void Mean(ref TCplx AMean)Same as Dew.Math.TOpenCLMtxVec.Meanc.
└ indexed: void Mean(ref TCplx AMean, Int32 Index, Int32 Len)
3void 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

Remarks:

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.

Examples
clMatrix a;
double b;
a.Size(2,2, clFloat, false);
a.CopyFromArray(TDoubleArray.Create(1,2,3,4));
b = a.Mean; // b = 2.5

Indexed: Double Mean(Int32 Index, Int32 Len)

Returns real mean value from calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Returns: Double

Remarks:

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.

#NameTypeDescription
1AMeanTCplx (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.

#NameTypeDescription
1AMeanTCplx (ref)pre-computed mean
2IndexInt32start index
3LenInt32element 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].

#NameTypeDescription
1AMeanDouble (ref)pre-computed mean
2IndexInt32start index
3LenInt32element count

Result: stored in self (calling object)

Remarks:

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.