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 949, Wed Sep 28 09:17:08 2005 UTC revision 954, Wed Sep 28 19:34:31 2005 UTC
# Line 24  Line 24 
24      else stop("'x' is not positive definite -- chol() undefined.")      else stop("'x' is not positive definite -- chol() undefined.")
25  }  }
26    
27    dimCheck <- function(a, b) {
28        da <- dim(a)
29        db <- dim(b)
30        if(any(da != db))
31            stop(gettextf("Matrices must have same dimensions in %s",
32                          deparse(sys.call(sys.parent()))),
33                 call. = FALSE)
34        da
35    }
36    
37  rowCheck <- function(a, b) {  rowCheck <- function(a, b) {
38      da <- dim(a)      da <- dim(a)
39      db <- dim(b)      db <- dim(b)
# Line 96  Line 106 
106    
107      stopifnot(is(x, "sparseMatrix"))      stopifnot(is(x, "sparseMatrix"))
108      if(is(x, "TsparseMatrix"))      if(is(x, "TsparseMatrix"))
109          stop("'x' must be column- or row-compressed  'sparseMatrix'")          return(unique(cbind(x@i,x@j)))
110    
111      isCol <- function(M) any("i" == slotNames(M))      isCol <- function(M) any("i" == slotNames(M))
112      .Call("compressed_non_0_ij", x, isCol(x), PACKAGE = "Matrix")      .Call("compressed_non_0_ij", x, isCol(x), PACKAGE = "Matrix")
113  }  }

Legend:
Removed from v.949  
changed lines
  Added in v.954

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