tripletMatrix-class {Matrix}R Documentation

Class "tripletMatrix" sparse matrices in triplet form

Description

The "tripletMatrix" class is the class of sparse matrices stored as (possibly redundant) triplets.

Objects from the Class

Objects can be created by calls of the form new("tripletMatrix", ...).

Slots

i:
Object of class "integer" - the row indices of non-zero entries.
j:
Object of class "integer" - the column indices of non-zero entries. Must be the same length as slot i.
x:
Object of class "numeric" - the (non-zero) entry at position (i,j). Must be the same length as slot i. If an index pair occurs more than once the corresponding values of slot x are added to form the element of the matrix.
Dim:
Object of class "integer" of length 2 - the dimensions of the matrix.

Methods

+
signature(e1 = "tripletMatrix", e2 = "tripletMatrix")
coerce
signature(from = "tripletMatrix", to = "cscMatrix")
coerce
signature(from = "tripletMatrix", to = "geMatrix")
coerce
signature(from = "tripletMatrix", to = "matrix")
coerce
signature(from = "tripletMatrix", to = "sscMatrix")
image
signature(x = "tripletMatrix"): plots an image of x using the levelplot function
t
signature(x = "tripletMatrix"): returns the transpose of x

Note

Triplet matrices are a convenient form in which to construct sparse matrices after which they can be coerced to cscMatrix objects.

See Also

cscMatrix-class


[Package Matrix version 0.8-21 Index]