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 2004, Tue Jul 17 22:12:30 2007 UTC revision 2005, Wed Jul 18 14:46:20 2007 UTC
# Line 50  Line 50 
50    
51    
52  setMethod("all", signature(x = "lsparseMatrix"),  setMethod("all", signature(x = "lsparseMatrix"),
53            function(x, ..., na.rm = FALSE)            function(x, ..., na.rm = FALSE) {
54            !is(x, "triangularMatrix") && all(x@x, ..., na.rm = na.rm))                d <- x@Dim
55                  l.x <- length(x@x)
56                  if(l.x == prod(d)) ## fully non-zero
57                      all(x@x, ..., na.rm = na.rm)
58                  else if(is(x, "symmetricMatrix") && l.x == choose(d[1]+1, 2)) {
59                      if(.Generic %in% summGener1)
60                          all(x@x, ..., na.rm = na.rm)
61                      else all(as(x, "generalMatrix")@x, ..., na.rm = na.rm)
62                  }
63                  else FALSE ## has at least one structural 0
64              })
65    
66  setMethod("any", signature(x = "lsparseMatrix"),  ## setMethod("any", ) ---> ./lMatrix.R
           function(x, ..., na.rm = FALSE)  
           ## logical unit-triangular has TRUE diagonal:  
           (is(x, "triangularMatrix") && x@diag == "U") ||  
           any(x@x, ..., na.rm = na.rm))  

Legend:
Removed from v.2004  
changed lines
  Added in v.2005

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