SCM

SCM Repository

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

Diff of /pkg/R/lsparseMatrix.R

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

revision 1766, Mon Feb 5 16:35:49 2007 UTC revision 1767, Mon Feb 5 16:53:17 2007 UTC
# Line 1  Line 1 
1  #### Superclass Methods for all sparse logical matrices  #### Superclass Methods for all sparse logical matrices
2    
3    if(FALSE) ## bug? in 'methods' - see ./nsparseMatrix.R :
4  setAs("CsparseMatrix", "lsparseMatrix",  setAs("CsparseMatrix", "lsparseMatrix",
5        function(from) as(.Call(Csparse_to_nz_pattern, from,        function(from) as(.Call(Csparse_to_nz_pattern, from,
6                                is(from, "triangularMatrix")), "lsparseMatrix"))                                is(from, "triangularMatrix")), "lsparseMatrix"))
7    ## substitute:
8    setAs("CsparseMatrix", "lsparseMatrix",
9          function(from) {
10              cld <- getClassDef(class(from))
11              if(extends(cld, "lsparseMatrix"))
12                  from
13              else if(extends(cld, "nsparseMatrix"))
14                  as(from, "lsparseMatrix")
15              else
16                  as(.Call(Csparse_to_nz_pattern, from,
17                           extends(cld, "triangularMatrix")),
18                     "lsparseMatrix")
19          })
20    
21    
22  setAs("lsparseMatrix", "matrix",  setAs("lsparseMatrix", "matrix",
23        function(from) as(as(from, "ldenseMatrix"), "matrix"))        function(from) as(as(from, "ldenseMatrix"), "matrix"))

Legend:
Removed from v.1766  
changed lines
  Added in v.1767

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