TMtxSmallInt.SetCol Method

Overload List

#SignatureDescription
1TMtxInt SetCol(TMtxVecInt Vec, Int32 Col)Copies values from vector to matrix column.
2TMtxInt SetCol(TMtxVecInt Vec, Int32 VecIndex, Int32 Row, Int32 Col, Int32 Len)Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row+Len-1,Col].

Overload 1: TMtxInt SetCol(TMtxVecInt Vec, Int32 Col)

Copies values from vector to matrix column.

#NameTypeDescription
1VecTMtxVecIntsource TVecInt or TMtxInt
2ColInt32

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

Remarks:

Copy all Vec elements to the calling matrix Col column. An exception is raised, if array bounds are overrun.

Examples
TMtxInt A;
TVecInt V;
MtxVec.CreateIt(out A);
MtxVec.CreateIt(out V);
try
    {
        A.Size(2,1);
        V.SetIt(new double[] {1,2, 2,4});
        A.SetCol(V,0);
    }
finally
    {
        MtxVec.FreeIt(ref V);
        MtxVec.FreeIt(ref A);
    }

Overload 2: TMtxInt SetCol(TMtxVecInt Vec, Int32 VecIndex, Int32 Row, Int32 Col, Int32 Len)

Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row+Len-1,Col].

#NameTypeDescription
1VecTMtxVecIntsource TVecInt or TMtxInt
2VecIndexInt32
3RowInt32
4ColInt32
5LenInt32element count

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

Remarks:

An exception is raised if condition checking is enabled and array bounds are overrun.