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 479, Wed Feb 2 14:52:26 2005 UTC revision 534, Tue Feb 8 08:59:31 2005 UTC
# Line 18  Line 18 
18      SET_SLOT(ans, Matrix_DimSym, allocVector(INTSXP, 2));      SET_SLOT(ans, Matrix_DimSym, allocVector(INTSXP, 2));
19      adims = INTEGER(GET_SLOT(ans, Matrix_DimSym));      adims = INTEGER(GET_SLOT(ans, Matrix_DimSym));
20      adims[0] = xdims[1]; adims[1] = xdims[0];      adims[0] = xdims[1]; adims[1] = xdims[0];
21      if (toupper(CHAR(asChar(GET_SLOT(x, Matrix_uploSym)))[0]) == 'U')      if (CHAR(asChar(GET_SLOT(x, Matrix_uploSym)))[0] == 'U')
22          SET_SLOT(ans, Matrix_uploSym, ScalarString(mkChar("L")));          SET_SLOT(ans, Matrix_uploSym, mkString("L"));
23      SET_SLOT(ans, Matrix_pSym, allocVector(INTSXP, xdims[0] + 1));      SET_SLOT(ans, Matrix_pSym, allocVector(INTSXP, xdims[0] + 1));
24      SET_SLOT(ans, Matrix_iSym, allocVector(INTSXP, nnz));      SET_SLOT(ans, Matrix_iSym, allocVector(INTSXP, nnz));
25      SET_SLOT(ans, Matrix_xSym, allocVector(REALSXP, nnz));      SET_SLOT(ans, Matrix_xSym, allocVector(REALSXP, nnz));
# Line 37  Line 37 
37  SEXP tsc_to_dgTMatrix(SEXP x)  SEXP tsc_to_dgTMatrix(SEXP x)
38  {  {
39      SEXP ans;      SEXP ans;
40      if (toupper(CHAR(STRING_ELT(GET_SLOT(x, Matrix_diagSym), 0))[0]) != 'U')      if (CHAR(STRING_ELT(GET_SLOT(x, Matrix_diagSym), 0))[0] != 'U')
41          ans = csc_to_dgTMatrix(x);          ans = csc_to_dgTMatrix(x);
42      else {                      /* unit triangular matrix */      else {                      /* unit triangular matrix */
43          SEXP islot = GET_SLOT(x, Matrix_iSym),          SEXP islot = GET_SLOT(x, Matrix_iSym),
# Line 132  Line 132 
132      SET_SLOT(ans, Matrix_DimSym, allocVector(INTSXP, 2));      SET_SLOT(ans, Matrix_DimSym, allocVector(INTSXP, 2));
133      dims = INTEGER(GET_SLOT(ans, Matrix_DimSym));      dims = INTEGER(GET_SLOT(ans, Matrix_DimSym));
134      dims[0] = dims[1] = n;      dims[0] = dims[1] = n;
135      SET_SLOT(ans, Matrix_uploSym, ScalarString(mkChar("L")));      SET_SLOT(ans, Matrix_uploSym, mkString("L"));
136      SET_SLOT(ans, Matrix_diagSym,      SET_SLOT(ans, Matrix_diagSym, (countDiag ? mkString("N") : mkString("U")));
              (countDiag ? ScalarString(mkChar("N")) :  
                  ScalarString(mkChar("U"))));  
137      parent_inv_ai(n, countDiag, pr, ai);      parent_inv_ai(n, countDiag, pr, ai);
138      UNPROTECT(1);      UNPROTECT(1);
139      return ans;      return ans;

Legend:
Removed from v.479  
changed lines
  Added in v.534

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