MatrixInt::SetIt Method

Overload List

#SignatureDescription
1TMtxInt *SetIt(const int Rows, const int Cols, const DewArray<int> &A) const;Sets object values.
2TMtxInt *SetIt(const int Rows, const int Cols, TIntPrecision aPrecision, const DewArray<int> &A) const;Sets matrix values.

Overload 1: TMtxInt *SetIt(const int Rows, const int Cols, const DewArray<int> &A) const;

Sets object values.

#NameTypeDescription
1Rowsconst int
2Colsconst int
3Aconst DewArray<int> &
Remarks:

Set object values. Method call does not change object's size, but it does check for array overrun. The elements of A array are copied to the calling object elements, starting at Index. The IntPrecision property of the calling object is not changed.

Examples
#include "MtxExprInt.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    MatrixInt A;

    A = {{1, 2}, {2, 4}};
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler

Overload 2: TMtxInt *SetIt(const int Rows, const int Cols, TIntPrecision aPrecision, const DewArray<int> &A) const;

Sets matrix values.

#NameTypeDescription
1Rowsconst int
2Colsconst int
3aPrecisionTIntPrecision
4Aconst DewArray<int> &
Remarks:

Pass all elements in A array to the calling matrix. The MatrixInt::Rows and MatrixInt::Cols properties of the calling matrix are set to ARows and ACols and the TMtxVecInt::IntPrecision property is set to aPrecision. An exception is raised if the matrix size(ARows*ACols) does not match the number of integer numbers in A.

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;

    CreateIt(A);
    A->SetIt(2, 2, DewArray<int>{1, 2, 2, 4});
    FreeIt(A);
}
See Also: MatrixInt::SetVal
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler