SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/R/diagMatrix.R
ViewVC logotype

Diff of /pkg/Matrix/R/diagMatrix.R

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

revision 2417, Fri Jul 10 16:17:28 2009 UTC revision 2458, Fri Aug 28 22:19:48 2009 UTC
# Line 596  Line 596 
596  ##           })  ##           })
597    
598  Cspdiagprod <- function(x, y) {  Cspdiagprod <- function(x, y) {
599      dx <- dim(x)      dx <- dim(x <- .Call(Csparse_diagU2N, x))
600      dy <- dim(y)      dy <- dim(y)
601      if(dx[2] != dy[1]) stop("non-matching dimensions")      if(dx[2] != dy[1]) stop("non-matching dimensions")
602      ind <- rep.int(seq_len(dx[2]), x@p[-1] - x@p[-dx[2]-1L])      ind <- rep.int(seq_len(dx[2]), x@p[-1] - x@p[-dx[2]-1L])
# Line 607  Line 607 
607    
608  diagCspprod <- function(x, y) {  diagCspprod <- function(x, y) {
609      dx <- dim(x)      dx <- dim(x)
610      dy <- dim(y)      dy <- dim(y <- .Call(Csparse_diagU2N, y))
611      if(dx[2] != dy[1]) stop("non-matching dimensions")      if(dx[2] != dy[1]) stop("non-matching dimensions")
612      if(x@diag == "N")      if(x@diag == "N")
613          y@x <- y@x * x@x[y@i + 1L]          y@x <- y@x * x@x[y@i + 1L]

Legend:
Removed from v.2417  
changed lines
  Added in v.2458

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