Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxVecInt *Abs() const; | Absolute values. |
| 2 | TMtxVecInt *Abs(const int Index, const int Len) const; | Absolute values of calling object elements [Index]..[Index+Len-1]. |
| 3 | TMtxVecInt *Abs(TMtxVecInt *Src) const; | Absolute values of all Src vector elements. |
| 4 | TMtxVecInt *Abs(TMtxVecInt *Src, const int SrcIndex, const int Index, const int Len) const; | Absolute values of Src vector elements [VecIndex]..[VecIndex+Len-1]. |
Overload 1: TMtxVecInt *Abs() const;
Absolute values.
Calculate the absolute value of all calling object elemets in-place.
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TMtxInt* a;
CreateIt(a);
a->SetIt(2, 2, DewArray<int>{1,-2,3,4});
a->Abs(); // a = [1,2,3,4]
FreeIt(a);
}
Overload 2: TMtxVecInt *Abs(const int Index, const int Len) const;
Absolute values of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | const int | |
| 2 | Len | const int |
Returns: calling vector elements [Index]..[Index+Len-1] ansolute vslues.
An exception is raised if array borders are overrun/underrun.
Note
Please note the calling vector elements [Index]..[Index+Len-1] are overwritten with result of routine call.
Overload 3: TMtxVecInt *Abs(TMtxVecInt *Src) const;
Absolute values of all Src vector elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt * |
Returns: Src vector elements ansolute vslues.
Overload 4: TMtxVecInt *Abs(TMtxVecInt *Src, const int SrcIndex, const int Index, const int Len) const;
Absolute values of Src vector elements [VecIndex]..[VecIndex+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt * | |
| 2 | SrcIndex | const int | |
| 3 | Index | const int | |
| 4 | Len | const int |
Returns: Src vector elements [VecIndex]..[VecIndex+Len-1] absolute values in calling vector elements [Index]..[Index+Len-1].
An exception is raised if array borders are overrun/underrun.
Note
Please note the calling vector elements [Index]..[Index+Len-1] are overwritten with result of routine call.