TMtxByte::SetVal Method

Overload List

#SignatureDescription
1TMtxVecInt *SetVal(int Value, int Index, int Len);Set all calling object elements [Index]..[Index+Len-1] to Value.
2TMtxVecInt *SetVal(int Value);Set all calling object elements to Value.
3TMtxInt *SetVal(const int Value, int Row, int Col, int ToRow, int ToCol);Initializes matrix values to Value.

Overload 1: TMtxVecInt *SetVal(int Value, int Index, int Len);

Set all calling object elements [Index]..[Index+Len-1] to Value.

#NameTypeDescription
1Valueint
2Indexint
3Lenint
Remarks:

An exception is raised if array borders are overrun/underrun.

Examples
#include "Units.MtxVecInt.h"

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

void Example()
{
    TVecInt* a;
    CreateIt(a);
    a->SetIt(DewArray<int>{1,2,3,4});
    a->SetVal(5,2,2);  // a = [1,1,5,5]
    FreeIt(a);
}
Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler

Overload 2: TMtxVecInt *SetVal(int Value);

Set all calling object elements to Value.

#NameTypeDescription
1Valueint
Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler

Overload 3: TMtxInt *SetVal(const int Value, int Row, int Col, int ToRow, int ToCol);

Initializes matrix values to Value.

#NameTypeDescription
1Valueconst int
2Rowint
3Colint
4ToRowint
5ToColint
Remarks:

Sets the calling matrix elements [Row,Col]..[ToRow,ToCol] to Value. An exception is raised if TMtxByte::ConditionCheck is true and array bounds are overrun.

See Also: TMtxByte::SetIt, TMtxByte::SetZero
Declared in Dew::Math::TMtxInt · Dew.Math/MtxVecInt.h · Cross-compiler