SCM

SCM Repository

[matrix] Diff of /pkg/inst/doc/Comparisons.Rnw
ViewVC logotype

Diff of /pkg/inst/doc/Comparisons.Rnw

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

revision 342, Mon Nov 15 13:55:52 2004 UTC revision 492, Thu Feb 3 14:24:03 2005 UTC
# Line 149  Line 149 
149  \citep{R:Chambers:1998} to retain information on the structure of  \citep{R:Chambers:1998} to retain information on the structure of
150  matrices from the intermediate calculations.  A general matrix in  matrices from the intermediate calculations.  A general matrix in
151  dense storage, created by the \code{Matrix} function, has class  dense storage, created by the \code{Matrix} function, has class
152  \code{"geMatrix"} but its cross-product has class \code{"poMatrix"}.  \code{"dgeMatrix"} but its cross-product has class \code{"dpoMatrix"}.
153  The \code{solve} methods for the \code{"poMatrix"} class use the  The \code{solve} methods for the \code{"dpoMatrix"} class use the
154  Cholesky decomposition.  Cholesky decomposition.
155  <<MatrixKoenNg>>=  <<MatrixKoenNg>>=
156  data(mm, package = "Matrix")  data(mm, package = "Matrix")
157  mm <- as(mm, "geMatrix")  mm <- as(mm, "dgeMatrix")
158  class(crossprod(mm))  class(crossprod(mm))
159  system.time(Mat.sol <- solve(crossprod(mm), crossprod(mm, y)), gc=TRUE)  system.time(Mat.sol <- solve(crossprod(mm), crossprod(mm, y)), gc=TRUE)
160  all.equal(naive.sol, as(Mat.sol, "matrix"))  all.equal(naive.sol, as(Mat.sol, "matrix"))

Legend:
Removed from v.342  
changed lines
  Added in v.492

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