MatrixInt::SetRow Method

Overload List

#SignatureDescription
1TMtxInt *SetRow(TMtxVecInt *Vec, int Row) const;Copies values from vector to matrix row.
2TMtxInt *SetRow(TMtxVecInt *Vec, int VecIndex, int Row, int Col, int Len) const;Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row,Col+Len-1].

Overload 1: TMtxInt *SetRow(TMtxVecInt *Vec, int Row) const;

Copies values from vector to matrix row.

#NameTypeDescription
1VecTMtxVecInt *
2Rowint
Remarks:

Copy all Vec elements to the calling matrix Row row. The TMtxVecInt::IntPrecision property of the calling matrix is adjusted automatically. An exception is raised, if array bounds are overrun.

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;
    TVecInt* V;

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

Overload 2: TMtxInt *SetRow(TMtxVecInt *Vec, int VecIndex, int Row, int Col, int Len) const;

Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row,Col+Len-1].

#NameTypeDescription
1VecTMtxVecInt *
2VecIndexint
3Rowint
4Colint
5Lenint
Remarks:

An exception is raised if condition checking is enabled and array bounds are overrun.

Examples
#include "MtxExprInt.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    MatrixInt A;
    VectorInt V;

    A.Size(1, 4);
    V = {1, 2, 2, 4};
    A.SetRow(V, 0);
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler