bool Equal(TMtxInt *Mtx) const;
Compares two matrices.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt * |
Remarks:
Compares Mtx with the calling matrix and returns true if the matrices are equal (if all elements match in position and value).
Examples
#include "Math387.h"
#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;
bool c;
CreateIt(A, B);
A->SetIt(2, 2, TIntPrecision::prInt32, DewArray<int>{1, 2, 2, 4}); // 2x2, int matrix
B->SetIt(2, 2, TIntPrecision::prInt32, DewArray<int>{1, 2, 2, 4}); // 2x2, real matrix
c = A->Equal(B); // Check for an exact match
FreeIt(A, B);
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler