# SCM Repository

[matrix] Diff of /pkg/R/syMatrix.R
 [matrix] / pkg / R / syMatrix.R

# Diff of /pkg/R/syMatrix.R

revision 474, Tue Feb 1 14:41:24 2005 UTC revision 475, Tue Feb 1 14:44:06 2005 UTC
# Line 1  Line 1
1     ### Coercion and Methods for Symmetric Matrices
2
3  setAs("syMatrix", "geMatrix",  setAs("syMatrix", "geMatrix",
4        function(from) {        function(from) .Call("syMatrix_as_geMatrix", from) )
.Call("syMatrix_as_geMatrix", from)
})
5
6  setAs("syMatrix", "matrix",  setAs("syMatrix", "matrix",
7        function(from) {        function(from) .Call("syMatrix_as_matrix", from) )
.Call("syMatrix_as_matrix", from)
})
8
9  setMethod("%*%", signature(x = "syMatrix", y = "geMatrix"),  setMethod("%*%", signature(x = "syMatrix", y = "geMatrix"),
10            function(x, y)            function(x, y) .Call("syMatrix_geMatrix_mm", x, y) )
.Call("syMatrix_geMatrix_mm", x, y))
11
12  setMethod("%*%", signature(x = "geMatrix", y = "syMatrix"),  setMethod("%*%", signature(x = "geMatrix", y = "syMatrix"),
13            function(x, y)            function(x, y) .Call("syMatrix_geMatrix_mm_R", y, x) )
.Call("syMatrix_geMatrix_mm_R", y, x))
14
15  setMethod("norm", signature(x = "syMatrix", type = "character"),  setMethod("norm", signature(x = "syMatrix", type = "character"),
16            function(x, type, ...)            function(x, type, ...) .Call("syMatrix_norm", x, type),
.Call("syMatrix_norm", x, type),
17            valueClass = "numeric")            valueClass = "numeric")
18
19  setMethod("norm", signature(x = "syMatrix", type = "missing"),  setMethod("norm", signature(x = "syMatrix", type = "missing"),
20            function(x, type, ...)            function(x, type, ...) .Call("syMatrix_norm", x, "O"),
.Call("syMatrix_norm", x, "O"),
21            valueClass = "numeric")            valueClass = "numeric")
22
23  setMethod("t", signature(x = "syMatrix"),  setMethod("t", signature(x = "syMatrix"), function(x) x)
function(x) x)

Legend:
 Removed from v.474 changed lines Added in v.475