Vector.GetRow Method

Overload List

#SignatureDescription
1function GetRow(const Mtx: TMtx; aRow: Integer): TVec;Copies a row from matrix.
2function GetRow(const Mtx: TMtx; aRow: Integer; aCol: Integer; Len: Integer): TVec;Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector.
3function GetRow(const Mtx: TMtx; aRow: Integer; aCol: Integer; Index: Integer; Len: Integer): TVec;Copy the Row-th column elements [Col]..[Col+Len-1] to calling vector elements [Index]..[Index+Len-1].

Overload 1: function GetRow(const Mtx: TMtx; aRow: Integer): TVec;

Copies a row from matrix.

#NameTypeDescription
1MtxTMtx
2aRowInteger

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

Remarks:

Copies the Row-th row from Mtx matrix to calling vector. The Vector.Length and Vector.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
var a: Vector;
    b: Matrix;
begin
    b.SetIt(2,2,False,[1,2,
        3,4]);
    a.GetRow(b,0); // a now contains [1,2]
end;
See Also: Vector.GetCol, Matrix.SetRow

Overload 2: function GetRow(const Mtx: TMtx; aRow: Integer; aCol: Integer; Len: Integer): TVec;

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

#NameTypeDescription
1MtxTMtx
2aRowInteger
3aColInteger
4LenIntegerelement count

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

Remarks:

The Vector.Length and Vector.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: function GetRow(const Mtx: TMtx; aRow: Integer; aCol: Integer; Index: Integer; Len: Integer): TVec;

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

#NameTypeDescription
1MtxTMtx
2aRowInteger
3aColInteger
4IndexIntegerstart index
5LenIntegerelement count

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

Remarks:

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