TMtxSmallInt.ConcatHorz Method

Overload List

#SignatureDescription
1function ConcatHorz(const Src: TMtxInt[]): TMtxInt;Concenates an array of matrices horizontally.
2function ConcatHorz(DestRow: Integer; DestCol: Integer; const Src: TMtxInt[]): TMtxInt;Concenate the Src matrices horizontally and store the results in the calling matrix.

Overload 1: function ConcatHorz(const Src: TMtxInt[]): TMtxInt;

Concenates an array of matrices horizontally.

#NameTypeDescription
1SrcTMtxInt[]

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

Remarks:

Concenate the Src matrices horizontally and store the results in the calling matrix. The TMtxInt.Rows, TMtxInt.Cols and TMtxVecInt.IntPrecision properties of the calling matrix are adjusted automatically. An exception is raised if any of the Src matrices IntPrecision or Rows property does not match.

Examples
var A,B,C,D,E: TMtxInt;
begin
    CreateIt(A,B,C,D);
    CreateIt(E);
    try
        A.Size(2,2);
        B.Size(A);
        E.Size(4,4);
        // overwrite the lower part of the E matrix
        //    with values from A and B
        E.ConcatHorz(2,2,[A,B]);
        //E becomes:
        //[E11 E12 E13 E14]
        //[E21 E22 E23 E24]
        //[A11 A12 B11 B12]
        //[A21 A22 B21 B22]
    finally
        FreeIt(E);
        FreeIt(A,B,C,D);
    end;
end;

Overload 2: function ConcatHorz(DestRow: Integer; DestCol: Integer; const Src: TMtxInt[]): TMtxInt;

Concenate the Src matrices horizontally and store the results in the calling matrix.

#NameTypeDescription
1DestRowInteger
2DestColInteger
3SrcTMtxInt[]

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

Remarks:

The DestRow and DestCol parameters indicate the starting position (in the calling matrix) for concenating. An exception is raised, if the calling matrix array bounds are overrun. An exception is raised, if any of the Src matrices IntPrecision or Rows properties do not match.