Skip to content

__matrix_type__

builtin · libnexusinterp/corefcn/matrix_type-proprietary.cc

: t = __matrix_type__ (A)
: t = __matrix_type__ (A, "nocompute")
: B = __matrix_type__ (A, type)
: B = __matrix_type__ (A, "upper", p)
: B = __matrix_type__ (A, "lower", p)
: B = __matrix_type__ (A, "banded", nl, nu)

Report or assign the structural class of the matrix A.

With one argument the class is determined from the data and returned as a string such as "Full", "Upper", "Lower", "Diagonal", "Positive Definite", "Rectangular", "Tridiagonal" or "Banded". With the option "nocompute" only a class that was previously assigned is reported; "Unknown" is returned when none was.

Giving a class name as second argument returns A unchanged but marked with that class, which later linear solves rely on. The names "full", "upper", "lower", "positive definite", "singular" and "unknown" are accepted. "upper" and "lower" may be followed by a permutation vector p for permuted triangular matrices. For sparse matrices, "banded" takes the lower and upper bandwidths nl and nu.