function LowerTriangle(const Mtx: TMtxInt; ZeroUpper: Boolean; Diagonal: Boolean): TMtxInt;
Constructs lower triangular matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TMtxInt | |
| 2 | ZeroUpper | Boolean | |
| 3 | Diagonal | Boolean |
Result: stored in self (calling object), returns self for chaining
Remarks:
The method uses Mtx matrix to construct a lower triangular matrix. The results are stored in the calling matrix. If the ZeroLower parameter is true then the calling matrix superdiagonal elements will be set to zero - otherwise the superdiagonal elements will not be initialized. If the Diagonal boolean parameter is true then the Mtx matrix main diagonal elements will be copied to the calling matrix main diagonal elements. If the Diagonal parameter is false, the calling matrix main diagonal elements will be set to zero.
Examples
var A,B: TMtxInt;
begin
CreateIt(A,B);
try
A.SetIt(2,1,[1,2,
2,4]); // 2x2, not complex matrix
B.LowerTriangle(A,True,True);
// B becomes:
// [1,0,
// [2,4]
finally
FreeIt(A,B);
end;
end;
See Also: MatrixInt.UpperTriangle