symmetricMatrix-class {Matrix}R Documentation

Virtual Class of Symmetric Matrices in package:Matrix

Description

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

The main use is in methods (and C functions) that can deal with all symmetric matrices.

Slots

uplo:
Object of class "character". Must be either "U", for upper triangular, and "L", for lower triangular.
Dim, Dimnames:
The dimension (a length-2 "integer") and corresponding names (or NULL), inherited from the Matrix-class, see there.

Extends

Class "Matrix", directly.

Methods

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

See Also

triangularMatrix-class, and, e.g., dsyMatrix-class for numeric dense matrices, or lsCMatrix-class for a logical sparse matrix class.

Examples

showClass("symmetricMatrix")

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

[Package Matrix version 0.98-7 Index]