SCM

SCM Repository

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

Diff of /pkg/R/Auxiliaries.R

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

revision 1253, Wed Apr 19 09:17:14 2006 UTC revision 1270, Thu May 18 06:44:43 2006 UTC
# Line 186  Line 186 
186    
187  ### There is a test on this in ../tests/dgTMatrix.R !  ### There is a test on this in ../tests/dgTMatrix.R !
188  uniq <- function(x) {  uniq <- function(x) {
189    
190    ### Note: maybe, using
191    ### ----    xj <- .Call("Matrix_expand_pointers", x@p)
192    ### would be slightly more efficient than as( <dgC> , "dgTMatrix")
193    ### but really efficient would be to use only one .Call(.) for uniq(.) !
194    ### Try to do it particularly fast for the case where 'x' is already a 'uniq' <dgT>
195    
196      if(is(x, "TsparseMatrix")) {      if(is(x, "TsparseMatrix")) {
197          ## Purpose: produce a *unique* triplet representation:          ## Purpose: produce a *unique* triplet representation:
198          ##              by having (i,j) sorted and unique          ##              by having (i,j) sorted and unique

Legend:
Removed from v.1253  
changed lines
  Added in v.1270

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