dtrMatrix-class {Matrix} | R Documentation

## Triangular, dense, numeric matrices

### Description

The `"dtrMatrix"` class is the class of triangular, dense, numeric matrices in nonpacked storage. The `"dtpMatrix"` class is the same except in packed storage.

### Objects from the Class

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

### 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"`; see `triangularMatrix`.
`x`:
  Object of class `"numeric"`. The numeric values that constitute the matrix, stored in column-major order.
`Dim`:
  Object of class `"integer"`. The dimensions of the matrix which must be a two-element vector of non-negative integers.

### Extends

Class `"ddenseMatrix"`, directly. Class `"triangularMatrix"`, directly. Class `"Matrix"` and others, by class `"ddenseMatrix"`.

### Methods

%*%
  `signature(x = "dtrMatrix", y = "matrix")` and other signatures (use `showMethods("%*%", class="dtrMatrix")`): matrix multiplication.
coerce
  `signature(from = "dgeMatrix", to = "dtrMatrix")`
coerce
  `signature(from = "dtrMatrix", to = "matrix")`
coerce
  `signature(from = "dtrMatrix", to = "ltrMatrix")`
coerce
  `signature(from = "dtrMatrix", to = "matrix")`
coerce
  `signature(from = "matrix", to = "dtrMatrix")`
norm
  `signature(x = "dtrMatrix", type = "character")`
rcond
  `signature(x = "dtrMatrix", norm = "character")`
solve
  `signature(a = "dtrMatrix", b = "missing")`
solve
  `signature(a = "dtrMatrix", b = "matrix")`

### See Also

Classes `ddenseMatrix`, `dtpMatrix`, `triangularMatrix`

### Examples

    (m <- rbind(2:3, 0:-1))
    (M <- as(m, "dgeMatrix"))

    (T <- as(M, "dtrMatrix")) ## upper triangular is default
    (T2 <- as(t(M), "dtrMatrix"))
    stopifnot(T@uplo == "U", T2@uplo == "L", identical(T2, t(T)))

[Package Matrix version 0.999375-33 Index]