LA::MatrixFlags
Inherits Enum / Comparable / Value / Object
MatrixFlags represent properties of matrix (symmetric, positive definite etc) They are used to automatically select faster algorithms from LAPACK. Flags are partially enforced by runtime checks, with the possibility of user override. Examples:
a.detect(MatrixFlags::Symmetric) # will perform a check and if matrix is symmetric, corresponding flag will be set
a.detect # perform check for all flags
a.assume!(MatrixFlags::Symmetric) # we know that matrix is symmetric, so we use `assume!` to set flag without check
a.transpose # will return clone of matrix, as for symmetrix matrices `a == a.transpose`
Simple operations correctly update flags:
(a + Mat.diag(*a.size)).flags.symmetric # => True
But direct access reset flags
a[1,1] = 1
a.flags.symmetric? # => False
Note that simple flag access doesn't perform check, so a.flags.symmetric? can be false for symmetric matrix, unless you called detect before.
Constants
This flag shows that matrix is symmetric (equal to its transpose)
This flag shows that matrix is hermitian (equal to its conjtranspose))
This flag shows that matrix is positive definite
This flag shows that matrix is orthogonal (its columns and rows are orthonormal vectors)
This flag shows that matrix is upper triangular (all the entries below the main diagonal are zero)
This flag shows that matrix is lower triangular (all the entries above the main diagonal are zero)
Combination of UpperTriangular | LowerTriangular for internal use