dMatrix-class

0th

Percentile

(Virtual) Class "dMatrix" of "double" Matrices

The dMatrix class is a virtual class contained by all actual classes of numeric matrices in the Matrix package. Similarly, all the actual classes of logical matrices inherit from the lMatrix class.

Keywords
classes, algebra
Slots

Common to all matrix object in the package:

Dim:

Object of class "integer" - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.

Dimnames:

list of length two; each component containing NULL or a character vector length equal the corresponding Dim element.

Methods

There are (relatively simple) group methods (see, e.g., Arith)

Arith

signature(e1 = "dMatrix", e2 = "dMatrix"): ...

Arith

signature(e1 = "dMatrix", e2 = "numeric"): ...

Arith

signature(e1 = "numeric", e2 = "dMatrix"): ...

Math

signature(x = "dMatrix"): ...

Math2

signature(x = "dMatrix", digits = "numeric"): this group contains round() and signif().

Compare

signature(e1 = "numeric", e2 = "dMatrix"): ...

Compare

signature(e1 = "dMatrix", e2 = "numeric"): ...

Compare

signature(e1 = "dMatrix", e2 = "dMatrix"): ...

Summary

signature(x = "dMatrix"): The "Summary" group contains the seven functions max(), min(), range(), prod(), sum(), any(), and all().

The following methods are also defined for all double matrices:

coerce

signature(from = "dMatrix", to = "matrix"): ...

%
expm

signature(x = "dMatrix"): computes the “Matrix Exponential”, see expm.

zapsmall

signature(x = "dMatrix"): ...

The following methods are defined for all logical matrices:

which

signature(x = "lsparseMatrix") and many other subclasses of "lMatrix": as the base function which(x, arr.ind) returns the indices of the TRUE entries in x; if arr.ind is true, as a 2-column matrix of row and column indices. Since Matrix version 1.2-9, if useNames is true, as by default, with dimnames, the same as base::which.

See Also

The nonzero-pattern matrix class '>nMatrix, which can be used to store non-NA logical matrices even more compactly.

The numeric matrix classes '>dgeMatrix, '>dgCMatrix, and '>Matrix.

drop0(x, tol=1e-10) is sometimes preferable to (and more efficient than) zapsmall(x, digits=10).

Aliases
  • dMatrix-class
  • lMatrix-class
  • show,dMatrix-method
  • coerce,dMatrix,lMatrix-method
  • coerce,lMatrix,dMatrix-method
  • coerce,lMatrix,dgCMatrix-method
  • coerce,matrix,lMatrix-method
  • [,dMatrix,lMatrix,missing,ANY-method
  • [,dMatrix,logical,missing,ANY-method
  • Ops,dMatrix,dMatrix-method
  • Ops,dMatrix,lMatrix-method
  • Ops,dMatrix,nMatrix-method
  • Ops,lMatrix,dMatrix-method
  • Ops,lMatrix,lMatrix-method
  • Ops,lMatrix,numeric-method
  • Ops,nMatrix,dMatrix-method
  • Ops,numeric,lMatrix-method
  • Arith,dMatrix,dMatrix-method
  • Arith,lMatrix,logical-method
  • Arith,lMatrix,numeric-method
  • Arith,logical,lMatrix-method
  • Arith,numeric,lMatrix-method
  • Compare,dMatrix,logical-method
  • Compare,dMatrix,numeric-method
  • Compare,lMatrix,logical-method
  • Compare,lMatrix,numeric-method
  • Compare,logical,dMatrix-method
  • Compare,logical,lMatrix-method
  • Compare,numeric,dMatrix-method
  • Compare,numeric,lMatrix-method
  • Logic,dMatrix,logical-method
  • Logic,dMatrix,numeric-method
  • Logic,lMatrix,logical-method
  • Logic,lMatrix,numeric-method
  • Logic,logical,dMatrix-method
  • Logic,logical,lMatrix-method
  • Logic,numeric,dMatrix-method
  • Logic,numeric,lMatrix-method
  • Summary,lMatrix-method
  • Math2,dMatrix-method
  • log,dMatrix-method
  • gamma,dMatrix-method
  • lgamma,dMatrix-method
  • zapsmall,dMatrix-method
  • which,lMatrix-method
Examples
# NOT RUN {
 showClass("dMatrix")

 set.seed(101)
 round(Matrix(rnorm(28), 4,7), 2)
 M <- Matrix(rlnorm(56, sd=10), 4,14)
 (M. <- zapsmall(M))
 table(as.logical(M. == 0))
# }
Documentation reproduced from package Matrix, version 1.2-18, License: GPL (>= 2) | file LICENCE

Community examples

Looks like there are no examples yet.