MatrixInt.Abs Method

Overload List

#SignatureDescription
1TMtxVecInt AbsAbsolute values.
└ indexed: TMtxVecInt Abs(Int32 Index, Int32 Len)
2TMtxVecInt Abs(TMtxVecInt Src)Absolute values of all Src vector elements.
└ indexed: TMtxVecInt Abs(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Overload 1: TMtxVecInt Abs

Absolute values.

Result: stored in self (calling object), returns self for chaining

Remarks:

Calculate the absolute value of all calling object elements in-place.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TMtxInt a;
        MtxVecInt.CreateIt(out a);
        try
        {
            a.SetIt(new int[] {1,-2,3,4});
            a.Abs(); // a = [1,2,3,4]
        }
        finally
        {
            MtxVecInt.FreeIt(ref a);
        }
    }
}

Indexed: TMtxVecInt Abs(Int32 Index, Int32 Len)

Absolute values of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexInt32start index
2LenInt32element count

Result: stored in self (calling object), returns self for chaining

Returns: calling vector elements [Index]..[Index+Len-1] ansolute vslues.

Remarks:

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 2: TMtxVecInt Abs(TMtxVecInt Src)

Absolute values of all Src vector elements.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt

Result: stored in self (calling object), returns self for chaining

Returns: Src vector elements ansolute vslues.

Indexed: TMtxVecInt Abs(TMtxVecInt Src, Int32 SrcIndex, Int32 Index, Int32 Len)

Absolute values of Src vector elements [VecIndex]..[VecIndex+Len-1].

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2SrcIndexInt32source start index
3IndexInt32start index
4LenInt32element count

Result: stored in self (calling object), returns self for chaining

Returns: Src vector elements [VecIndex]..[VecIndex+Len-1] absolute values in calling vector elements [Index]..[Index+Len-1].

Remarks:

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.