function LowerTriangle(const Src: TSparseMtx; Diagonal: Boolean): TSparseMtx;
Extract lower part of the Mtx.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TSparseMtx | |
| 2 | Diagonal | Boolean |
Returns: TSparseMtx
Remarks:
Copies only the lower triangular part of the Src sparse matrix. The result is stored in the calling sparse matrix. If the Diagonal boolean parameter is true then the Src 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 asp, bsp: TSparseMtx;
csp, dsp: TSparseMtx;
d: Vector;
// ...
// #1 : split asp into lower(bsp), upper(csp) and diagonal(d) sections
bsp.LowerTriangle(asp);
csp.UpperTriangle(asp);
asp.Diag(d);
// now combine lower(bsp), upper, and diagonal(d) back
dsp.AddSplit(bsp,d,csp);
// should be equal
if not asp.Equal(dsp) then Eraise('Not Equal!');
See Also: TSparseMtx.UpperTriangle