TVec.GetRow Method

Overload List

#SignatureDescription
1TVec GetRow(TMtx Mtx, Int32 Row)Copies a row from matrix.
2TVec GetRow(TMtx Mtx, Int32 Row, Int32 Col, Int32 Len)Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector.
3TVec GetRow(TMtx Mtx, Int32 Row, Int32 Col, Int32 Index, Int32 Len)Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector elements [Index]..[Index+Len-1].

Overload 1: TVec GetRow(TMtx Mtx, Int32 Row)

Copies a row from matrix.

#NameTypeDescription
1MtxTMtxsource TMtx
2RowInt32

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

Remarks:

Copies the Row-th row from Mtx matrix to calling vector. The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of calling vector are adjusted automatically. An exception is raised if condition checking is enabled and Row is greater than Mtx.Rows-1.

Examples
TVec a;
TMtx b;
MtxVec.CreateIt(out a);
MtxVec.CreateIt(out b);
try
    {
        b.SetIt(2,2,false,[1,2,
        3,4]);
        a.GetRow(b,0); // a now contains new double[] {1,2}
    }
finally
    {
        MtxVec.FreeIt(ref a);
        MtxVec.FreeIt(ref b);
    }
See Also: TVec.GetCol, TMtx.SetRow

Overload 2: TVec GetRow(TMtx Mtx, Int32 Row, Int32 Col, Int32 Len)

Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector.

#NameTypeDescription
1MtxTMtxsource TMtx
2RowInt32
3ColInt32
4LenInt32element count

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

Remarks:

The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of calling vector are adjusted automatically. An exception is raised if condition checking is enabled and column array borders are overrun.

Overload 3: TVec GetRow(TMtx Mtx, Int32 Row, Int32 Col, Int32 Index, Int32 Len)

Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector elements [Index]..[Index+Len-1].

#NameTypeDescription
1MtxTMtxsource TMtx
2RowInt32
3ColInt32
4IndexInt32start index
5LenInt32element count

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

Remarks:

The Dew.Math.TMtxVec.Complex property of calling vector must be set explicitly. An exception is raised if condition checking is enabled and column array borders are overrun.