Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx *FlipHor() const; | Flips the matrix elements horizontally. |
| 2 | TMtx *FlipHor(TMtx *SrcMtx) const; | Flip all SrcMtx matrix elements horizontally and store the results in the calling matrix. |
Overload 1: TMtx *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 "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Matrix A, B;
A.SetIt(2, 2, false, DewArray<double>{1, 2, 2, 4}); // 2x2, not complex matrix
B.FlipHor(A);
// B becomes:
// [2,1]
// [4,2]
}
See Also: Matrix::FlipVer
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler
Overload 2: TMtx *FlipHor(TMtx *SrcMtx) const;
Flip all SrcMtx matrix elements horizontally and store the results in the calling matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SrcMtx | TMtx * |
Remarks:
The flip operation is performed on all SrcMtx matrix rows. The Matrix::Rows, Matrix::Cols and Matrix::Complex properties of callign matrix are adjusted automatically.
Examples
#include "MtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
Matrix A, B;
A = {{1, 2}, {2, 4}}; // 2x2, not complex matrix
B.FlipHor(A);
// B becomes:
// [2,1]
// [4,2]
}
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler