SCM

SCM Repository

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

Diff of /pkg/R/denseMatrix.R

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

revision 1547, Mon Sep 11 14:49:39 2006 UTC revision 1548, Mon Sep 11 22:13:07 2006 UTC
# Line 18  Line 18 
18            if (notGen) { ## e.g. for triangular | symmetric            if (notGen) { ## e.g. for triangular | symmetric
19                ## FIXME: this is a *waste* in the case of packed matrices!                ## FIXME: this is a *waste* in the case of packed matrices!
20                if     (extends(cl, "dMatrix")) from <- as(from, "dgeMatrix")                if     (extends(cl, "dMatrix")) from <- as(from, "dgeMatrix")
21                  else if(extends(cl, "nMatrix")) from <- as(from, "ngeMatrix")
22                else if(extends(cl, "lMatrix")) from <- as(from, "lgeMatrix")                else if(extends(cl, "lMatrix")) from <- as(from, "lgeMatrix")
23                else if(extends(cl, "zMatrix")) from <- as(from, "zgeMatrix")                else if(extends(cl, "zMatrix")) from <- as(from, "zgeMatrix")
24                else stop("undefined method for class ", cl)                else stop("undefined method for class ", cl)
# Line 105  Line 106 
106                if (is(object,"dMatrix"))                if (is(object,"dMatrix"))
107                    isTRUE(all.equal(as(object, "dgeMatrix"),                    isTRUE(all.equal(as(object, "dgeMatrix"),
108                                     as(t(object), "dgeMatrix"), tol = tol))                                     as(t(object), "dgeMatrix"), tol = tol))
109                  else if (is(object, "nMatrix"))
110                      identical(as(object, "ngeMatrix"),
111                                as(t(object), "ngeMatrix"))
112                else if (is(object, "lMatrix"))# not possible currently                else if (is(object, "lMatrix"))# not possible currently
113                    ## test for exact equality; FIXME(?): identical() too strict?                    ## test for exact equality; FIXME(?): identical() too strict?
114                    identical(as(object, "lgeMatrix"),                    identical(as(object, "lgeMatrix"),

Legend:
Removed from v.1547  
changed lines
  Added in v.1548

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