SCM Repository

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

Diff of /pkg/R/Matrix.R

revision 945, Wed Sep 28 08:54:28 2005 UTC revision 946, Wed Sep 28 08:56:42 2005 UTC
# Line 97  Line 97
97            function (x, y)            function (x, y)
98            stop(gettextf('not-yet-implemented method for <%s> %%*%% <%s>',            stop(gettextf('not-yet-implemented method for <%s> %%*%% <%s>',
99                          class(x), class(y))))                          class(x), class(y))))
100
101    ## Move this to ./Auxiliaries.R
102    .bail.out.1 <- function(fun, cl) {
103        stop(gettextf('not-yet-implemented method for %s(<%s>)', fun, cl),
104             call. = FALSE)
105    }
106    .bail.out.2 <- function(fun, cl1, cl2) {
107        stop(gettextf('not-yet-implemented method for %s(<%s>, <%s>)',
108                      fun, cl1, cl2), call. = FALSE)
109    }
110
111  setMethod("crossprod", signature(x = "Matrix", y = "ANY"),  setMethod("crossprod", signature(x = "Matrix", y = "ANY"),
112            function (x, y = NULL)            function (x, y = NULL) .bail.out.2(.Generic, class(x), class(y)))
113            stop(gettextf('not-yet-implemented method for crossprod(<%s>, <%s>)',
114                          class(x), class(y))))  setMethod("t", signature(x = "Matrix"),
115              function(x) .bail.out.1(.Generic, class(x)))
116
117    ## Group Methods (bail-out)
118    setMethod("Compare", signature(e1 = "Matrix", e2 = "Matrix"),
119              function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2)))
120    setMethod("Compare", signature(e1 = "Matrix", e2 = "ANY"),
121              function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2)))
122    setMethod("Compare", signature(e1 = "ANY", e2 = "Matrix"),
123              function(e1, e2) .bail.out.2(.Generic, class(e1), class(e2)))
124
125
126
127  ### --------------------------------------------------------------------------  ### --------------------------------------------------------------------------

Legend:
 Removed from v.945 changed lines Added in v.946