# SCM Repository

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

# Diff of /pkg/R/Auxiliaries.R

revision 1659, Wed Nov 1 17:50:15 2006 UTC revision 1665, Fri Nov 3 23:18:07 2006 UTC
# Line 623  Line 623
623  }  }
624
625
## FIXME? -- this should also work for "ltT", "ntT", ... :
626  diagU2N <- function(x)  diagU2N <- function(x)
627  {  {
628      ## Purpose: Transform a *unit diagonal* sparse triangular matrix      ## Purpose: Transform a *unit diagonal* sparse triangular matrix
629      ##  into one with explicit diagonal entries '1'      ##  into one with explicit diagonal entries '1'
630        if(is(x, "CsparseMatrix"))
631            return(.Call(Csparse_diagU2N, x))
632        ## else
633
634        ## FIXME! -- for "ltT", "ntT", ... :
635      xT <- as(x, "dgTMatrix")      xT <- as(x, "dgTMatrix")
636      ## leave it as  T* - the caller can always coerce to C* if needed:      ## leave it as  T* - the caller can always coerce to C* if needed:
637      new("dtTMatrix", x = xT@x, i = xT@i, j = xT@j, Dim = x@Dim,      new("dtTMatrix", x = xT@x, i = xT@i, j = xT@j, Dim = x@Dim,

Legend:
 Removed from v.1659 changed lines Added in v.1665