Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double Median() const; | Median. |
| 2 | double Median(int Index, int Len) const; | Calculate median value for calling vector elements [Index]..[Index+Len-1]. |
Overload 1: double Median() const;
Median.
Remarks:
Calculate median value for all calling object elements.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a;
double c;
a.SetIt(false, DewArray<double>{1, 2, 3, 4});
c = a.Median();
}
See Also: Vector::Mean
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler
Overload 2: double Median(int Index, int Len) const;
Calculate median value for calling vector elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | int | |
| 2 | Len | int |
Remarks:
An exception is raised if Vector::ConditionCheck is true and array borders are overrun.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Vector a;
double c;
a = {1, 2, 3, 4};
c = a.Median();
}
Declared in Dew::Math::Vector · Dew.Math/MtxExpr.h · Cross-compiler