Matrix.SetVal Method

Overload List

#SignatureDescription
1TMtxVec SetVal(TCplx Value)Set all calling object complex elements to complex Value.
└ indexed: TMtxVec SetVal(TCplx Value, Int32 Index, Int32 Len)
2TMtx SetVal(TCplx Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)Sets the calling matrix elements [Row,Col]..[Row+ToRow,Col+ToCol] to complex value Value.
3TMtxVec SetVal(Double Value)Initialize elements to Value.
└ indexed: TMtxVec SetVal(Double Value, Int32 Index, Int32 Len)
4TMtx SetVal(Double Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)Initializes matrix values to Value.

Overload 1: TMtxVec SetVal(TCplx Value)

Set all calling object complex elements to complex Value.

#NameTypeDescription
1ValueTCplxscalar

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

Indexed: TMtxVec SetVal(TCplx Value, Int32 Index, Int32 Len)

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

#NameTypeDescription
1ValueTCplxscalar
2IndexInt32start index
3LenInt32element count

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

Remarks:

Dew.Math.Matrix.Complex properties of the calling object are set to true even before the call it was false. An exception is raised if calling object array borders are overrun/underrun.

Overload 2: TMtx SetVal(TCplx Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)

Sets the calling matrix elements [Row,Col]..[Row+ToRow,Col+ToCol] to complex value Value.

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

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

Remarks:

Dew.Math.Matrix.Complex properties of the calling object are set to true even before the call it was false. An exception is raised if array bounds are overrun.

See Also: Matrix.SetIt, Matrix.SetZero

Overload 3: TMtxVec SetVal(Double Value)

Initialize elements to Value.

#NameTypeDescription
1ValueDoublescalar

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

Remarks:

Set all calling object elements to Value. If the calling object is complex then the real part is set to Value and the imaginary is set to zero.

Examples
Matrix a;
a.Size(1,4,false);
a.SetVal(1); // a = new double[] {1,1,1,1}
See Also: Matrix.SetZero

Indexed: TMtxVec SetVal(Double Value, Int32 Index, Int32 Len)

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

#NameTypeDescription
1ValueDoublescalar
2IndexInt32start index
3LenInt32element count

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

Remarks:

If the calling object is complex then the real part is set to Value and the imaginary is set to zero. An exception is raised if array borders are overrun/underrun.

Overload 4: TMtx SetVal(Double Value, Int32 Row, Int32 Col, Int32 ToRow, Int32 ToCol)

Initializes matrix values to Value.

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

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

Remarks:

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

See Also: Matrix.SetIt, Matrix.SetZero