SCM

SCM Repository

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

Diff of /pkg/R/sparseMatrix.R

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

revision 1658, Wed Nov 1 17:43:46 2006 UTC revision 1659, Wed Nov 1 17:50:15 2006 UTC
# Line 299  Line 299 
299     })     })
300    
301    
 ## not exported:  
302  setMethod("isSymmetric", signature(object = "sparseMatrix"),  setMethod("isSymmetric", signature(object = "sparseMatrix"),
303            function(object, tol = 100*.Machine$double.eps) {            function(object, tol = 100*.Machine$double.eps) {
304                ## pretest: is it square?                ## pretest: is it square?
# Line 308  Line 307 
307                ## else slower test                ## else slower test
308                if (is(object, "dMatrix"))                if (is(object, "dMatrix"))
309                    ## use gC; "T" (triplet) is *not* unique!                    ## use gC; "T" (triplet) is *not* unique!
310                    isTRUE(all.equal(as(object, "dgCMatrix"),                    isTRUE(all.equal(.as.dgC.0.factors(  object),
311                                     as(t(object), "dgCMatrix"), tol = tol))                                     .as.dgC.0.factors(t(object)), tol = tol))
312                else if (is(object, "lMatrix"))                else if (is(object, "lMatrix"))
313                    ## test for exact equality; FIXME(?): identical() too strict?                    ## test for exact equality; FIXME(?): identical() too strict?
314                    identical(as(object, "lgCMatrix"),                    identical(as(object, "lgCMatrix"),
# Line 322  Line 321 
321            })            })
322    
323    
324    ## These two are not (yet?) exported:
325  setMethod("isTriangular", signature(object = "sparseMatrix"),  setMethod("isTriangular", signature(object = "sparseMatrix"),
326            function(object, upper = NA)            function(object, upper = NA)
327                isTriC(as(object, "CsparseMatrix"), upper))                isTriC(as(object, "CsparseMatrix"), upper))

Legend:
Removed from v.1658  
changed lines
  Added in v.1659

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