The R Project SVN R-packages

Rev

Rev 4963 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4963 Rev 4994
Line 345... Line 345...
345
		  r
345
		  r
346
	  })
346
	  })
347
 
347
 
348
setMethod("diag", "CsparseMatrix",
348
setMethod("diag", "CsparseMatrix",
349
	  function(x, nrow, ncol) {
349
	  function(x, nrow, ncol) {
-
 
350
              ## "FIXME": could be more efficient; creates new ..CMatrix:
350
	      dm <- .Call(Csparse_band, x, 0, 0)
351
	      dm <- .Call(Csparse_band, x, 0, 0)
351
	      dlen <- min(dm@Dim)
352
	      dlen <- min(dm@Dim)
352
	      ind1 <- dm@i + 1L	# 1-based index vector
353
	      ind1 <- dm@i + 1L	# 1-based index vector
353
	      if (is(dm, "nMatrix")) {
354
	      if (is(dm, "nMatrix")) {
354
		  val <- rep.int(FALSE, dlen)
355
		  val <- rep.int(FALSE, dlen)