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 924, Mon Sep 19 08:40:29 2005 UTC revision 925, Mon Sep 19 19:01:31 2005 UTC
# Line 86  Line 86 
86      ## else return a (i,j) matrix of non-zero-indices      ## else return a (i,j) matrix of non-zero-indices
87    
88      stopifnot(is(x, "sparseMatrix"))      stopifnot(is(x, "sparseMatrix"))
89      if(is(x, "gTMatrix"))      if(is(x, "TsparseMatrix"))
90          stop("'x' must be column- or row-compressed  'sparseMatrix'")          stop("'x' must be column- or row-compressed  'sparseMatrix'")
91      isCol <- function(M) any("i" == slotNames(M))      isCol <- function(M) any("i" == slotNames(M))
92      .Call("compressed_non_0_ij", x, isCol(x), PACKAGE = "Matrix")      .Call("compressed_non_0_ij", x, isCol(x), PACKAGE = "Matrix")
93  }  }
94    
95  ### These are currently tests in ../tests/dgTMatrix.R !!!  ### There is a test on this in ../tests/dgTMatrix.R !
96  uniq <- function(x) {  uniq <- function(x) {
97      if(is(x, "gTMatrix")) {      if(is(x, "TsparseMatrix")) {
98          ## Purpose: produce a *unique* triplet representation:          ## Purpose: produce a *unique* triplet representation:
99          ##              by having (i,j) sorted and unique          ##              by having (i,j) sorted and unique
100          ## -----------------------------------------------------------          ## -----------------------------------------------------------

Legend:
Removed from v.924  
changed lines
  Added in v.925

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