SCM

SCM Repository

[matrix] Diff of /pkg/man/tcrossprod.Rd
ViewVC logotype

Diff of /pkg/man/tcrossprod.Rd

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

revision 675, Sat Mar 26 11:16:05 2005 UTC revision 976, Fri Oct 7 20:18:29 2005 UTC
# Line 3  Line 3 
3  \alias{tcrossprod-methods}  \alias{tcrossprod-methods}
4  \alias{tcrossprod,dgCMatrix-method}  \alias{tcrossprod,dgCMatrix-method}
5  \alias{tcrossprod,dgTMatrix-method}  \alias{tcrossprod,dgTMatrix-method}
6    \alias{tcrossprod,matrix-method}
7    \alias{tcrossprod,numeric-method}
8    % more \alias{tcrossprod,...}es in *-class*.Rd files
9  \alias{tcrossprod}  \alias{tcrossprod}
10  \title{Cross-product of transpose}  \title{Cross-product of transpose}
11  \description{  \description{
# Line 41  Line 44 
44   object.size(m) / object.size(mm) # smaller by a factor of 242.88   object.size(m) / object.size(mm) # smaller by a factor of 242.88
45    
46   ## tcrossprod() is very fast:   ## tcrossprod() is very fast:
47   system.time(tCmm <- tcrossprod(mm))# "0" practically   system.time(tCmm <- tcrossprod(mm))# 0   (PIII, 933 MHz)
48   system.time(cm <- crossprod(t(m))) #   system.time(cm <- crossprod(t(m))) # 0.16
49     system.time(cm. <- tcrossprod(m))  # 0.02
50    
51   stopifnot(identical(cm, as(tCmm, "matrix")))   stopifnot(identical(cm, as(tCmm, "matrix")))
52    
53   ## show "sparse" (sub) matrix   ## show sparse sub matrix
54   tc <- cm[1:16, 1:30]   tCmm[1:16, 1:30]
  storage.mode(tc) <- "character" ; tc[tc == "0"] <- "."  
  dimnames(tc)[[2]] <- rep("", ncol(tc))  
  noquote(tc)  
55  }  }
56  \keyword{methods}  \keyword{methods}
57  \keyword{algebra}  \keyword{algebra}

Legend:
Removed from v.675  
changed lines
  Added in v.976

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