Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double Min(); | Minimum value. |
| 2 | double Min(int Index, int Len); | Calculate the minimum value from calling object elements [Index]..[Index+Len-1]. |
| 3 | void Min(double &AMin, int Index, int Len); | Calculate the minimum value from calling object elements [Index]..[Index+Len-1]. |
| 4 | void Min(double &AMin, int &aIndex, int Index, int Len); | Calculate the minimum value of calling object elements [Index]..[Index+Len-1]. |
| 5 | void Min(double &AMin, int &aIndex); | Calculate the minimum value of all calling object elements. |
| 6 | int Min(TCplx &AMin, int Index, int Len); | Same as the TMtx::Minc method. |
Overload 1: double Min();
Minimum value.
Returns: The minimum value of all calling object elements. The result is a real value.
An exception is raised if calling object TMtx::Complex property is true.
#include "Units.MtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;
void Example()
{
TVec* a;
CreateIt(a);
a->SetIt(false, DewArray<double>{1,2,3,4});
double b = a->Min(); // 1.0
FreeIt(a);
}
#include "MtxExpr.h"
#include "Units.Math387.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::Math387;
void Example()
{
Vector a;
a.SetIt(DewArray<double>{ 1.0, 2.0, 3.0, 4.0 });
double result = a.Min();
if (Abs(result - 1.0) > 1e-10)
throw tException(DewString("Vector.Min: expected 1.0, got ") + SampleToStr(result));
}
Overload 2: double Min(int Index, int Len);
Calculate the minimum value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | int | |
| 2 | Len | int |
The result is a real value. An exception is raised if calling object TMtx::Complex property is true or array borders are overrun.
Overload 3: void Min(double &AMin, int Index, int Len);
Calculate the minimum value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMin | double & | |
| 2 | Index | int | |
| 3 | Len | int |
The result AMin is a real value. An exception is raised if calling object TMtx::Complex property is true or array borders are overrun.
Overload 4: void Min(double &AMin, int &aIndex, int Index, int Len);
Calculate the minimum value of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMin | double & | |
| 2 | aIndex | int & | |
| 3 | Index | int | |
| 4 | Len | int |
The AMax parameter returns the minimum value. The aIndex parameter returns the index of minimum value. An exception is raised if calling object TMtx::Complex property is true or array borders are overrud/underrun.
Overload 5: void Min(double &AMin, int &aIndex);
Calculate the minimum value of all calling object elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMin | double & | |
| 2 | aIndex | int & |
The AMin parameter returns the minimum value. The aIndex parameter returns the index of minimum value. An exception is raised if calling object TMtx::Complex property is true.
Overload 6: int Min(TCplx &AMin, int Index, int Len);
Same as the TMtx::Minc method.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | AMin | TCplx & | |
| 2 | Index | int | |
| 3 | Len | int |