SCM Repository

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

Diff of /pkg/Matrix/R/diagMatrix.R

revision 2206, Wed Jun 25 14:57:02 2008 UTC revision 2207, Mon Jul 7 22:34:52 2008 UTC
# Line 354  Line 354
354                                  j = "index", value = "replValue"),                                  j = "index", value = "replValue"),
355                   function(x,i,j, ..., value) replDiag(x, j=j, value=value))                   function(x,i,j, ..., value) replDiag(x, j=j, value=value))
356
357    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index",
358                                    value = "scarceMatrix"),
359                     function (x, i, j, ..., value)
360                     callGeneric(x=x, , j=j, value = as(value, "sparseVector")))
361    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing",
362                                    value = "scarceMatrix"),
363                     function (x, i, j, ..., value)
364                     callGeneric(x=x, i=i, , value = as(value, "sparseVector")))
365    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index",
366                                    value = "scarceMatrix"),
367                     function (x, i, j, ..., value)
368                     callGeneric(x=x, i=i, j=j, value = as(value, "sparseVector")))
369
370    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "missing", j = "index",
371                                    value = "sparseVector"),
372                     replDiag)
373    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "missing",
374                                    value = "sparseVector"),
375                     replDiag)
376    setReplaceMethod("[", signature(x = "diagonalMatrix", i = "index", j = "index",
377                                    value = "sparseVector"),
378                     replDiag)
379
380
381  setMethod("t", signature(x = "diagonalMatrix"),  setMethod("t", signature(x = "diagonalMatrix"),
382            function(x) { x@Dimnames <- x@Dimnames[2:1] ; x })            function(x) { x@Dimnames <- x@Dimnames[2:1] ; x })

Legend:
 Removed from v.2206 changed lines Added in v.2207