Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double Mean() const; | Mean value. |
| 2 | double Mean(int Index, int Len) const; | Returns real mean value from calling object elements [Index]..[Index+Len-1]. |
| 3 | void Mean(double &AMean, int Index, int Len) const; | Calculate the mean value from calling object elements [Index]..[Index+Len-1]. |
| 4 | void Mean(TCplx &AMean) const; | Same as clMatrix::Meanc. |
| 5 | void Mean(TCplx &AMean, int Index, int Len) const; | Same as clMatrix::Meanc. |
Overload 1: double Mean() const;
Mean value.
Remarks:
Calculate the mean value of all calling object elements. The result is a real value. An exception is raised if calling object clMatrix::Complex property is true.
Examples
#include "clMtxExpr.h"
#include "clMtxVec.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
clMatrix a;
double b;
a.Size(2, 2, TclFloatPrecision::clFloat, false);
a.CopyFromArray(DewArray<double>{1, 2, 3, 4});
b = a.Mean(); // b = 2.5
}
See Also: clMatrix::Sum, clMatrix::Meanc
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler
Overload 2: double Mean(int Index, int Len) const;
Returns real mean value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | int | |
| 2 | Len | int |
Remarks:
An exception is raised if calling object clMatrix::Complex property is true or array borders are overrun.
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler
Overload 3: void Mean(double &AMean, int Index, int Len) const;
Calculate the mean value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | double & | |
| 2 | Index | int | |
| 3 | Len | int |
Remarks:
The result AMean is a real value. An exception is raised if calling object clMatrix::Complex property is true or array borders are overrun/underrun.
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler
Overload 4: void Mean(TCplx &AMean) const;
Same as clMatrix::Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx & |
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler
Overload 5: void Mean(TCplx &AMean, int Index, int Len) const;
Same as clMatrix::Meanc.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMean | TCplx & | |
| 2 | Index | int | |
| 3 | Len | int |
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler