MatrixInt::FlipHor Method

Overload List

#SignatureDescription
1TMtxInt *FlipHor() const;Flips the matrix elements horizontally.
2TMtxInt *FlipHor(TMtxInt *SrcMtx) const;Flip all SrcMtx matrix elements horizontally.

Overload 1: TMtxInt *FlipHor() const;

Flips the matrix elements horizontally.

Remarks:

Flip calling matrix elements horizontally - element [row, j] = element [row, Cols-j]. This operation is performed on all calling matrix Rows.

Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;

void Example()
{
    TMtxInt *A, *B;

    CreateIt(A, B);
    A->SetIt(2, 2, DewArray<int>{1, 2, 2, 4}); // 2x2, not complex matrix
    B->FlipHor(A);
    // B becomes:
    // [2,1]
    // [4,2]
    FreeIt(A, B);
}
See Also: MatrixInt::FlipVer
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 2: TMtxInt *FlipHor(TMtxInt *SrcMtx) const;

Flip all SrcMtx matrix elements horizontally.

#NameTypeDescription
1SrcMtxTMtxInt *
Remarks:

Store the results in the calling matrix. The flip operation is performed on all SrcMtx matrix Rows. The MatrixInt::Rows, MatrixInt::Cols and TMtxVecInt::IntPrecision properties of callign matrix are adjusted automatically.

Examples
#include "MtxExprInt.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    MatrixInt A, B;

    A = {{1, 2}, {2, 4}}; // 2x2, not complex matrix
    B.FlipHor(A);
    // B becomes:
    // [2,1]
    // [4,2]
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler