triangularMatrix-class {Matrix}R Documentation

Virtual Class of Triangular Matrices in package:Matrix

Description

The virtual class of triangular matrices,"triangularMatrix", from the package Matrix contains numeric and logical, dense and sparse matrices, e.g., see the examples.

The main use will be in methods (and C functions) that can deal with all triangular matrices.

Slots

uplo:
Object of class "character". Must be either "U", for upper triangular, and "L", for lower triangular.
diag:
Object of class "character". Must be either "U", for unit triangular (diagonal is all ones), or "N" for non-unit. The diagonal elements are not accessed internally when diag is "U" (but need to be allocated, i.e., length(x) does not depend on diag).
Dim, Dimnames:
The dimension (a length-2 "integer") and corresponding names (or NULL), inherited from the Matrix, see there.

Extends

Class "Matrix", directly.

Methods

There's a C function triangularMatrix_validity() called by the internal validity checking functions.

See Also

Classes symmetricMatrix, and, e.g., dtrMatrix for numeric dense matrices, or ltCMatrix for a logical sparse matrix subclass of "triangularMatrix".

Examples

showClass("triangularMatrix")

## The names of direct subclasses:
scl <- getClass("triangularMatrix")@subclasses
directly <- sapply(lapply(scl, slot, "by"), length) == 0
names(scl)[directly]

[Package Matrix version 0.999375-4 Index]