TMtx.RowExchange Method

TMtx RowExchange(Int32 i, Int32 j)

Exchanges two matrix rows.

#NameTypeDescription
1iInt32
2jInt32

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

Remarks:

Exchange the i-th and j-th rows of the calling matrix in-place. An exception is raised if matrix bounds are overrun. The indexes i and j are zero based. (the first row has index 0).

Examples
TMtx A;
TMtx B;
MtxVec.CreateIt(out A, out B);
try
    {
        A.SetIt(2,2,false,[1,3,
        2,4]);
        B.RowExchange(0,1);
        // B becomes:
        // [2,4,
        //  1,3]);
    }
finally
    {
        MtxVec.FreeIt(ref A, ref B);
    }
See Also: TMtx.ColExchange