SCM

SCM Repository

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

Diff of /pkg/R/lsCMatrix.R

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

revision 1617, Fri Oct 6 15:42:12 2006 UTC revision 1618, Fri Oct 6 15:44:01 2006 UTC
# Line 8  Line 8 
8  setAs("lsCMatrix", "lgCMatrix",  setAs("lsCMatrix", "lgCMatrix",
9        function(from) .Call(Csparse_symmetric_to_general, from))        function(from) .Call(Csparse_symmetric_to_general, from))
10    
 if(FALSE) ## FIXME : partially done in C ../src/Csparse.c :  
11  setAs("lgCMatrix", "lsCMatrix",  setAs("lgCMatrix", "lsCMatrix",
12        function(from) .Call(Csparse_general_to_symmetric, from))        function(from) .Call(Csparse_general_to_symmetric, from, uplo = "U"))
13    ## now use it:
14    aslsC.by.lgC <- function(from) as(as(from, "lgCMatrix"), "lsCMatrix")
15    setAs("lgTMatrix", "lsCMatrix", aslsC.by.lgC) # <-> needed for Matrix()
16    setAs("matrix",    "lsCMatrix", aslsC.by.lgC)
17    
18  ## Specific conversions, should they be necessary.  Better to convert as  ## Specific conversions, should they be necessary.  Better to convert as
19  ## as(x, "TsparseMatrix") or as(x, "denseMatrix")  ## as(x, "TsparseMatrix") or as(x, "denseMatrix")

Legend:
Removed from v.1617  
changed lines
  Added in v.1618

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