Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxInt *SetVal(const int Value) const; | Set all calling object elements to Value. |
| 2 | TMtxVecInt *SetVal(const int Value, const int Index, const int Len) const; | Set calling object elements [Index]..[Index+Len-1] to Value. |
| 3 | TMtxInt *SetVal(const int Value, int Row, int Col, int ToRow, int ToCol) const; | Initializes matrix values to Value. |
Overload 1: TMtxInt *SetVal(const int Value) const;
Set all calling object elements to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | const int |
Examples
#include "MtxExprInt.h"
#include "Units.MtxExprInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxExprInt;
void Example()
{
MatrixInt a;
a = {{1, 2}, {3, 4}};
a.SetVal(5, 2, 2); // a = [1,1,5,5]
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler
Overload 2: TMtxVecInt *SetVal(const int Value, const int Index, const int Len) const;
Set calling object elements [Index]..[Index+Len-1] to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | const int | |
| 2 | Index | const int | |
| 3 | Len | const int |
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()
{
TMtxInt* a;
CreateIt(a);
a->SetIt(2,2,DewArray<int>{1,2,3,4});
a->SetVal(5,2,2); // a = [1,1,5,5]
FreeIt(a);
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler
Overload 3: TMtxInt *SetVal(const int Value, int Row, int Col, int ToRow, int ToCol) const;
Initializes matrix values to Value.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | const int | |
| 2 | Row | int | |
| 3 | Col | int | |
| 4 | ToRow | int | |
| 5 | ToCol | int |
Remarks:
Sets the calling matrix elements [Row,Col]..[ToRow,ToCol] to Value. An exception is raised if TMtxVecBase::ConditionCheck is true and array bounds are overrun.
See Also: MatrixInt::SetIt, MatrixInt::SetZero
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler