lgeMatrix-class.RdThis is the class of general dense logical
matrices.
x:Object of class "logical". The logical
values that constitute the matrix, stored in column-major order.
Dim,Dimnames:The dimension (a length-2
"integer") and corresponding names (or NULL), see the
Matrix class.
factors:Object of class "list". A named
list of factorizations that have been computed for the matrix.
Class "ldenseMatrix", directly.
Class "lMatrix", by class "ldenseMatrix".
Class "denseMatrix", by class "ldenseMatrix".
Class "Matrix", by class "ldenseMatrix".
Class "Matrix", by class "ldenseMatrix".
Currently, mainly t() and coercion methods (for
as(.)); use, e.g.,
showMethods(class="lgeMatrix") for details.
showClass("lgeMatrix")
#> Class "lgeMatrix" [package "Matrix"]
#>
#> Slots:
#>
#> Name: Dim Dimnames x factors
#> Class: integer list logical list
#>
#> Extends:
#> Class "unpackedMatrix", directly
#> Class "ldenseMatrix", directly
#> Class "generalMatrix", directly
#> Class "lMatrix", by class "ldenseMatrix", distance 2
#> Class "denseMatrix", by class "ldenseMatrix", distance 2
#> Class "Matrix", by class "generalMatrix", distance 2
str(new("lgeMatrix"))
#> Formal class 'lgeMatrix' [package "Matrix"] with 4 slots
#> ..@ Dim : int [1:2] 0 0
#> ..@ Dimnames:List of 2
#> .. ..$ : NULL
#> .. ..$ : NULL
#> ..@ x : logi(0)
#> ..@ factors : list()
set.seed(1)
(lM <- Matrix(matrix(rnorm(28), 4,7) > 0))# a simple random lgeMatrix
#> 4 x 7 Matrix of class "lgeMatrix"
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] FALSE TRUE TRUE FALSE FALSE TRUE TRUE
#> [2,] TRUE FALSE FALSE FALSE TRUE TRUE FALSE
#> [3,] FALSE TRUE TRUE TRUE TRUE TRUE FALSE
#> [4,] TRUE TRUE TRUE FALSE TRUE FALSE FALSE
set.seed(11)
(lC <- Matrix(matrix(rnorm(28), 4,7) > 0))# a simple random lgCMatrix
#> 4 x 7 sparse Matrix of class "lgCMatrix"
#>
#> [1,] . | . . . . |
#> [2,] | . . . | . |
#> [3,] . | . . . . .
#> [4,] . | . | . | .
as(lM, "CsparseMatrix")
#> 4 x 7 sparse Matrix of class "lgCMatrix"
#>
#> [1,] . | | . . | |
#> [2,] | . . . | | .
#> [3,] . | | | | | .
#> [4,] | | | . | . .