1 |
#### Triangular Sparse Matrices in compressed column-oriented format |
#### Triangular Sparse Matrices in compressed column-oriented format |
2 |
|
|
3 |
setAs("dtCMatrix", "ltCMatrix", # just drop 'x' slot: |
setAs("dtCMatrix", "ltCMatrix", |
4 |
function(from) new("ltCMatrix", i = from@i, p = from@p, |
function(from) new("ltCMatrix", i = from@i, p = from@p, |
5 |
uplo = from@uplo, diag = from@diag, |
uplo = from@uplo, diag = from@diag, |
6 |
|
x = as.logical(from@x), |
7 |
## FIXME?: use from@factors smartly |
## FIXME?: use from@factors smartly |
8 |
Dim = from@Dim, Dimnames = from@Dimnames)) |
Dim = from@Dim, Dimnames = from@Dimnames)) |
9 |
|
setAs("dtCMatrix", "ntCMatrix", # just drop 'x' slot: |
10 |
|
function(from) new("ntCMatrix", i = from@i, p = from@p, |
11 |
|
uplo = from@uplo, diag = from@diag, |
12 |
|
## FIXME?: use from@factors smartly |
13 |
|
Dim = from@Dim, Dimnames = from@Dimnames)) |
14 |
|
|
15 |
|
|
16 |
setAs("matrix", "dtCMatrix", |
setAs("matrix", "dtCMatrix", |
17 |
function(from) as(as(from, "dtTMatrix"), "dtCMatrix")) |
function(from) as(as(from, "dtTMatrix"), "dtCMatrix")) |