SCM

SCM Repository

[matrix] Diff of /pkg/R/dsTMatrix.R
ViewVC logotype

Diff of /pkg/R/dsTMatrix.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1279, Tue May 23 08:01:11 2006 UTC revision 1280, Tue May 23 08:01:44 2006 UTC
# Line 2  Line 2 
2    
3  setAs("dsTMatrix", "dsCMatrix",  setAs("dsTMatrix", "dsCMatrix",
4        function(from)        function(from)
5        ## pre-Cholmod: .Call("dsTMatrix_as_dsCMatrix", from, PACKAGE = "Matrix")        ## pre-Cholmod: .Call(dsTMatrix_as_dsCMatrix, from)
6        .Call("Tsparse_to_Csparse", from, PACKAGE = "Matrix")        .Call(Tsparse_to_Csparse, from)
7        )        )
8    
9  if(FALSE) # have C method below  if(FALSE) # have C method below
# Line 17  Line 17 
17        })        })
18    
19  setAs("dsTMatrix", "dgTMatrix",  setAs("dsTMatrix", "dgTMatrix",
20        function(from) .Call("dsTMatrix_as_dgTMatrix", from, PACKAGE = "Matrix"))        function(from) .Call(dsTMatrix_as_dgTMatrix, from))
21    
22  setAs("dsTMatrix", "lsTMatrix",  setAs("dsTMatrix", "lsTMatrix",
23        function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo,        function(from) new("lsTMatrix", i = from@i, j = from@j, uplo = from@uplo,
# Line 26  Line 26 
26    
27  ## Conversion <--> dense storage is via dsyMatrix :  ## Conversion <--> dense storage is via dsyMatrix :
28  setAs("dsTMatrix", "dsyMatrix",  setAs("dsTMatrix", "dsyMatrix",
29        function(from) .Call("dsTMatrix_as_dsyMatrix", from, PACKAGE = "Matrix"))        function(from) .Call(dsTMatrix_as_dsyMatrix, from))
30    
31  setAs("dsTMatrix", "dgeMatrix",  setAs("dsTMatrix", "dgeMatrix",
32        function(from) as(as(from, "dsyMatrix"), "dgeMatrix"))        function(from) as(as(from, "dsyMatrix"), "dgeMatrix"))
# Line 46  Line 46 
46    
47  setMethod("writeHB", signature(obj = "dsTMatrix"),  setMethod("writeHB", signature(obj = "dsTMatrix"),
48            function(obj, file, ...)            function(obj, file, ...)
49            .Call("Matrix_writeHarwellBoeing",            .Call(Matrix_writeHarwellBoeing,
50                  if (obj@uplo == "U") t(obj) else obj,                  if (obj@uplo == "U") t(obj) else obj,
51                  as.character(file), "DST", PACKAGE = "Matrix"))                  as.character(file), "DST"))
52    
53  setMethod("writeMM", signature(obj = "dsTMatrix"),  setMethod("writeMM", signature(obj = "dsTMatrix"),
54            function(obj, file, ...)            function(obj, file, ...)
55            .Call("Matrix_writeMatrixMarket",            .Call(Matrix_writeMatrixMarket,
56                  if (obj@uplo == "U") t(obj) else obj,                  if (obj@uplo == "U") t(obj) else obj,
57                  as.character(file), "DST", PACKAGE = "Matrix"))                  as.character(file), "DST"))

Legend:
Removed from v.1279  
changed lines
  Added in v.1280

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge