The R Project SVN R-packages

Rev

Rev 4529 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4529 Rev 4549
Line 30... Line 30...
30
	  new("ngeMatrix", x = c(as(from, "matrix")), # is fast,
30
	  new("ngeMatrix", x = c(as(from, "matrix")), # is fast,
31
	      Dim = from@Dim, Dimnames = from@Dimnames))
31
	      Dim = from@Dim, Dimnames = from@Dimnames))
32
 
32
 
33
setAs("ngCMatrix", "matrix",
33
setAs("ngCMatrix", "matrix",
34
      function(from) .Call(ncsc_to_matrix, from))
34
      function(from) .Call(ncsc_to_matrix, from))
-
 
35
## not this: .Call(Csparse_to_matrix, from)), since it goes via dense -> double precision
-
 
36
 
35
## TODO (maybe): write  matrix_to_lcsc()  in ../src/ngCMatrix.c
37
## TODO (maybe): write  matrix_to_lcsc()  in ../src/ngCMatrix.c
36
setAs("matrix", "ngCMatrix",
38
setAs("matrix", "ngCMatrix",
37
      function(from) as(as(from, "ngTMatrix"), "ngCMatrix"))
39
      function(from) as(as(from, "ngTMatrix"), "ngCMatrix"))
38
 
40
 
39
 
41