SCM

SCM Repository

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

Diff of /pkg/R/pMatrix.R

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

revision 1548, Mon Sep 11 22:13:07 2006 UTC revision 1654, Fri Oct 27 16:58:15 2006 UTC
# Line 26  Line 26 
26  setAs("pMatrix", "ngTMatrix",  setAs("pMatrix", "ngTMatrix",
27        function(from) {        function(from) {
28            d <- from@Dim            d <- from@Dim
29            new("ngTMatrix", i = seq(length = d[1]) - 1:1, j = from@perm - 1:1,            new("ngTMatrix", i = seq_len(d[1]) - 1:1, j = from@perm - 1:1,
30                Dim = d, Dimnames = from@Dimnames)                Dim = d, Dimnames = from@Dimnames)
31        })        })
32    
# Line 36  Line 36 
36  setMethod("solve", signature(a = "pMatrix", b = "missing"),  setMethod("solve", signature(a = "pMatrix", b = "missing"),
37            function(a, b) {            function(a, b) {
38                bp <- ap <- a@perm                bp <- ap <- a@perm
39                bp[ap] <- seq(along = ap)                bp[ap] <- seq_along(ap)
40                new("pMatrix", perm = bp, Dim = a@Dim,                new("pMatrix", perm = bp, Dim = a@Dim,
41                    Dimnames = rev(a@Dimnames))                    Dimnames = rev(a@Dimnames))
42            }, valueClass = "pMatrix")            }, valueClass = "pMatrix")

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

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