extract_tri

STD.BLAS.extract_tri ( m, n, tri, dt, a );

mNumber of rows
nNumber of columns
triIndicates whether upper or lower triangle is used
dtUse Diagonal.NotUnitTri or Diagonal.UnitTri
aThe matrix, usually a composite from factoring
Return:Triangle

The extract_tri function extracts the upper or lower triangle. The diagonal can be the actual or implied unit diagonal.

Example:

IMPORT STD;
Diagonal := STD.BLAS.Types.Diagonal;
Triangle := STD.BLAS.Types.Triangle;
STD.BLAS.Types.matrix_t x := [1.0, 2.0, 3.0, 2.0, 2.0, 2.0, 4.0, 4.0, 4.0];
triangle := STD.BLAS.extract_tri(3, 3, Triangle.upper, Diagonal.NotUnitTri, x);