SCM

SCM Repository

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

Diff of /pkg/R/dtpMatrix.R

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

revision 1279, Tue May 23 08:01:11 2006 UTC revision 1280, Tue May 23 08:01:44 2006 UTC
# Line 1  Line 1 
1  #### Triangular Packed Matrices -- Coercion and Methods  #### Triangular Packed Matrices -- Coercion and Methods
2    
3  setAs("dtpMatrix", "dtrMatrix",  setAs("dtpMatrix", "dtrMatrix",
4        function(from) .Call("dtpMatrix_as_dtrMatrix", from, PACKAGE = "Matrix"))        function(from) .Call(dtpMatrix_as_dtrMatrix, from))
5    
6  setAs("dtpMatrix", "dgeMatrix",  setAs("dtpMatrix", "dgeMatrix",
7        function(from) as(as(from, "dtrMatrix"), "dgeMatrix"))        function(from) as(as(from, "dtrMatrix"), "dgeMatrix"))
# Line 23  Line 23 
23    
24    
25  setMethod("%*%", signature(x = "dtpMatrix", y = "dgeMatrix"),  setMethod("%*%", signature(x = "dtpMatrix", y = "dgeMatrix"),
26            function(x, y) .Call("dtpMatrix_dgeMatrix_mm", x, y, PACKAGE = "Matrix"))            function(x, y) .Call(dtpMatrix_dgeMatrix_mm, x, y))
27  setMethod("%*%", signature(x = "dgeMatrix", y = "dtpMatrix"),  setMethod("%*%", signature(x = "dgeMatrix", y = "dtpMatrix"),
28            function(x, y) .Call("dgeMatrix_dtpMatrix_mm", x, y, PACKAGE = "Matrix"))            function(x, y) .Call(dgeMatrix_dtpMatrix_mm, x, y))
29  ## %*% should always work for  <fooMatrix> %*% <fooMatrix>  ## %*% should always work for  <fooMatrix> %*% <fooMatrix>
30  setMethod("%*%", signature(x = "dtpMatrix", y = "dtpMatrix"),  setMethod("%*%", signature(x = "dtpMatrix", y = "dtpMatrix"),
31            function(x, y)            function(x, y)
# Line 66  Line 66 
66            })            })
67    
68  setMethod("diag", signature(x = "dtpMatrix"),  setMethod("diag", signature(x = "dtpMatrix"),
69            function(x = 1, nrow, ncol = n) .Call("dtpMatrix_getDiag", x, PACKAGE = "Matrix"),            function(x = 1, nrow, ncol = n) .Call(dtpMatrix_getDiag, x),
70            valueClass = "numeric")            valueClass = "numeric")
71    
72  setMethod("norm", signature(x = "dtpMatrix", type = "character"),  setMethod("norm", signature(x = "dtpMatrix", type = "character"),
73            function(x, type, ...)            function(x, type, ...)
74            .Call("dtpMatrix_norm", x, type, PACKAGE = "Matrix"),            .Call(dtpMatrix_norm, x, type),
75            valueClass = "numeric")            valueClass = "numeric")
76    
77  setMethod("norm", signature(x = "dtpMatrix", type = "missing"),  setMethod("norm", signature(x = "dtpMatrix", type = "missing"),
78            function(x, type, ...)            function(x, type, ...)
79            .Call("dtpMatrix_norm", x, "O", PACKAGE = "Matrix"),            .Call(dtpMatrix_norm, x, "O"),
80            valueClass = "numeric")            valueClass = "numeric")
81    
82  setMethod("rcond", signature(x = "dtpMatrix", type = "character"),  setMethod("rcond", signature(x = "dtpMatrix", type = "character"),
83            function(x, type, ...)            function(x, type, ...)
84            .Call("dtpMatrix_rcond", x, type, PACKAGE = "Matrix"),            .Call(dtpMatrix_rcond, x, type),
85            valueClass = "numeric")            valueClass = "numeric")
86    
87  setMethod("rcond", signature(x = "dtpMatrix", type = "missing"),  setMethod("rcond", signature(x = "dtpMatrix", type = "missing"),
88            function(x, type, ...)            function(x, type, ...)
89            .Call("dtpMatrix_rcond", x, "O", PACKAGE = "Matrix"),            .Call(dtpMatrix_rcond, x, "O"),
90            valueClass = "numeric")            valueClass = "numeric")
91    
92  setMethod("solve", signature(a = "dtpMatrix", b="missing"),  setMethod("solve", signature(a = "dtpMatrix", b="missing"),
93            function(a, b, ...)            function(a, b, ...)
94            .Call("dtpMatrix_solve", a, PACKAGE = "Matrix"),            .Call(dtpMatrix_solve, a),
95            valueClass = "dtpMatrix")            valueClass = "dtpMatrix")
96    
97  setMethod("solve", signature(a = "dtpMatrix", b="matrix"),  setMethod("solve", signature(a = "dtpMatrix", b="matrix"),
98            function(a, b, ...)            function(a, b, ...)
99            .Call("dtpMatrix_matrix_solve", a, b, PACKAGE = "Matrix"),            .Call(dtpMatrix_matrix_solve, a, b),
100            valueClass = "matrix")            valueClass = "matrix")
101    
102  setMethod("t", signature(x = "dtpMatrix"),  setMethod("t", signature(x = "dtpMatrix"),

Legend:
Removed from v.1279  
changed lines
  Added in v.1280

root@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