SCM

SCM Repository

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

Diff of /pkg/R/MatrixFactorization.R

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

revision 1444, Fri Aug 25 14:39:45 2006 UTC revision 2081, Sat Oct 6 22:01:45 2007 UTC
# Line 6  Line 6 
6    
7  setMethod("show", "MatrixFactorization",  setMethod("show", "MatrixFactorization",
8            function(object) { ## cheap one -- can have better for sub-classes            function(object) { ## cheap one -- can have better for sub-classes
9                cl <- class(object)                ## cl <- class(object)
10                cat(sprintf("'MatrixFactorization' of class \"%s\"\n", cl))                ## cat(sprintf("'MatrixFactorization' of class \"%s\"\n", cl))
11                  cat("'MatrixFactorization' of ")
12                str(object)                str(object)
13                })                })
14    
15    setMethod("dim", "MatrixFactorization", function(x) x@Dim)
16    
17    ## e.g., for (CHMfactor, <num>):
18    setMethod("solve", signature(a = "MatrixFactorization", b = "numeric"),
19              function(a, b, ...) callGeneric(a, Matrix(b)))
20    ## catch others, otherwise base::solve is.
21    setMethod("solve", signature(a = "MatrixFactorization", b = "ANY"),
22              function(a, b, ...) .bail.out.2("solve", class(a), class(b)))
23    setMethod("solve", signature(a = "MatrixFactorization", b = "missing"),
24              function(a, b, ...) .bail.out.1("solve", class(a)))

Legend:
Removed from v.1444  
changed lines
  Added in v.2081

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