TMtxInt.SetVal Method

Overload List

#SignatureDescription
1TMtxInt SetVal(Int32 Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)Initializes matrix values to Value.
2TMtxVecInt SetVal(Int32 Value)Set all calling object elements to Value.
└ indexed: TMtxVecInt SetVal(Int32 Value, Int32 Index, Int32 Len)

Overload 1: TMtxInt SetVal(Int32 Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)

Initializes matrix values to Value.

#NameTypeDescription
1ValueInt32
2RowInt32
3ColInt32
4ToRowInt32
5ToColInt32

Result: stored in self (calling object), returns self for chaining

Remarks:

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

See Also: TMtxInt.SetIt, TMtxInt.SetZero

Overload 2: TMtxVecInt SetVal(Int32 Value)

Set all calling object elements to Value.

#NameTypeDescription
1ValueInt32

Result: stored in self (calling object), returns self for chaining

Indexed: TMtxVecInt SetVal(Int32 Value, Int32 Index, Int32 Len)

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

#NameTypeDescription
1ValueInt32
2IndexInt32start index
3LenInt32element count

Result: stored in self (calling object), returns self for chaining

Remarks:

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

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TMtxInt a;
        MtxVecInt.CreateIt(out a);
        try
        {
            a.SetIt(2,2,new int[] {1,2,3,4});
            a.SetVal(5,2,2);  // a = [1,1,5,5]
        }
        finally
        {
            MtxVecInt.FreeIt(ref a);
        }
    }
}