You are here: Symbol Reference > MtxVecInt Namespace > Classes > TVecInt Class > public > GetRow Method > TVecInt.GetRow Method (TMtxInt, integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
TVecInt.GetRow Method (TMtxInt, integer)

Copies a row from matrix.

Pascal
function GetRow(const Mtx: TMtxInt; Row: integer): TVecInt; overload;

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

GetCol, TMtx.SetRow

var a: TVecInt; b: TMtxInt; begin CreateIt(a); CreateIt(b); try b.SetIt(2,2,[1,2, 3,4]); a.GetRow(b,0); // a now contains [1,2] finally FreeIt(a); FreeIt(b); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!