SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/dtCMatrix.c
ViewVC logotype

Diff of /pkg/Matrix/src/dtCMatrix.c

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

revision 945, Wed Sep 28 08:54:28 2005 UTC revision 951, Wed Sep 28 12:42:51 2005 UTC
# Line 13  Line 13 
13          islot = GET_SLOT(x, Matrix_iSym);          islot = GET_SLOT(x, Matrix_iSym);
14      int nnz = length(islot),      int nnz = length(islot),
15          *adims, *xdims = INTEGER(GET_SLOT(x, Matrix_DimSym));          *adims, *xdims = INTEGER(GET_SLOT(x, Matrix_DimSym));
16      int up = CHAR(asChar(GET_SLOT(x, Matrix_uploSym)))[0] == 'U';      int up = uplo_P(x)[0] == 'U';
17    
18      adims = INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2));      adims = INTEGER(ALLOC_SLOT(ans, Matrix_DimSym, INTSXP, 2));
19      adims[0] = xdims[1]; adims[1] = xdims[0];      adims[0] = xdims[1]; adims[1] = xdims[0];
20    
21      if(diag_value(x) == 'U')      if(*diag_P(x) == 'U')
22          SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(x, Matrix_diagSym)));          SET_SLOT(ans, Matrix_diagSym, duplicate(GET_SLOT(x, Matrix_diagSym)));
23      SET_SLOT(ans, Matrix_uploSym, mkString(up ? "L" : "U"));      SET_SLOT(ans, Matrix_uploSym, mkString(up ? "L" : "U"));
24    
# Line 35  Line 35 
35  SEXP tsc_to_dgTMatrix(SEXP x)  SEXP tsc_to_dgTMatrix(SEXP x)
36  {  {
37      SEXP ans;      SEXP ans;
38      if (CHAR(STRING_ELT(GET_SLOT(x, Matrix_diagSym), 0))[0] != 'U')      if (*diag_P(x) != 'U')
39          ans = compressed_to_dgTMatrix(x, ScalarLogical(1));          ans = compressed_to_dgTMatrix(x, ScalarLogical(1));
40      else {                      /* unit triangular matrix */      else {                      /* unit triangular matrix */
41          SEXP islot = GET_SLOT(x, Matrix_iSym),          SEXP islot = GET_SLOT(x, Matrix_iSym),

Legend:
Removed from v.945  
changed lines
  Added in v.951

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge