SCM

SCM Repository

[matrix] Diff of /branches/Matrix-mer2/src/dppMatrix.c
ViewVC logotype

Diff of /branches/Matrix-mer2/src/dppMatrix.c

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

revision 950, Wed Sep 28 12:42:11 2005 UTC revision 951, Wed Sep 28 12:42:51 2005 UTC
# Line 44  Line 44 
44          int *dims = INTEGER(GET_SLOT(Chol, Matrix_DimSym)), info;          int *dims = INTEGER(GET_SLOT(Chol, Matrix_DimSym)), info;
45          double anorm = get_norm_sp(obj, typnm);          double anorm = get_norm_sp(obj, typnm);
46    
47          F77_CALL(dppcon)(CHAR(asChar(GET_SLOT(Chol, Matrix_uploSym))),          F77_CALL(dppcon)(uplo_P(Chol), dims,
48                           dims, REAL(GET_SLOT(Chol, Matrix_xSym)),                           REAL(GET_SLOT(Chol, Matrix_xSym)), &anorm, &rcond,
                          &anorm, &rcond,  
49                           (double *) R_alloc(3*dims[0], sizeof(double)),                           (double *) R_alloc(3*dims[0], sizeof(double)),
50                           (int *) R_alloc(dims[0], sizeof(int)), &info);                           (int *) R_alloc(dims[0], sizeof(int)), &info);
51          SET_SLOT(obj, Matrix_rcondSym,          SET_SLOT(obj, Matrix_rcondSym,
# Line 69  Line 68 
68      SET_SLOT(val, Matrix_uploSym, duplicate(GET_SLOT(Chol, Matrix_uploSym)));      SET_SLOT(val, Matrix_uploSym, duplicate(GET_SLOT(Chol, Matrix_uploSym)));
69      SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(Chol, Matrix_xSym)));      SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(Chol, Matrix_xSym)));
70      SET_SLOT(val, Matrix_DimSym, duplicate(GET_SLOT(Chol, Matrix_DimSym)));      SET_SLOT(val, Matrix_DimSym, duplicate(GET_SLOT(Chol, Matrix_DimSym)));
71      F77_CALL(dpptri)(CHAR(asChar(GET_SLOT(val, Matrix_uploSym))),      F77_CALL(dpptri)(uplo_P(val), dims,
72                       dims, REAL(GET_SLOT(val, Matrix_xSym)), &info);                       REAL(GET_SLOT(val, Matrix_xSym)), &info);
73      UNPROTECT(1);      UNPROTECT(1);
74      return val;      return val;
75  }  }
# Line 91  Line 90 
90      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)
91          error(_("Dimensions of system to be solved are inconsistent"));          error(_("Dimensions of system to be solved are inconsistent"));
92      Memcpy(INTEGER(ALLOC_SLOT(val, Matrix_DimSym, INTSXP, 2)), bdims, 2);      Memcpy(INTEGER(ALLOC_SLOT(val, Matrix_DimSym, INTSXP, 2)), bdims, 2);
93      F77_CALL(dpptrs)      F77_CALL(dpptrs)(uplo_P(Chol), &n, &nrhs,
         (CHAR(asChar(GET_SLOT(Chol, Matrix_uploSym))), &n, &nrhs,  
94           REAL(GET_SLOT(Chol, Matrix_xSym)),           REAL(GET_SLOT(Chol, Matrix_xSym)),
95           Memcpy(REAL(ALLOC_SLOT(val, Matrix_xSym, REALSXP, sz)),           Memcpy(REAL(ALLOC_SLOT(val, Matrix_xSym, REALSXP, sz)),
96                  REAL(cl ? GET_SLOT(b, Matrix_xSym) : b), sz), &n, &info);                              REAL(cl ? GET_SLOT(b, Matrix_xSym) : b), sz),
97                         &n, &info);
98      UNPROTECT(1);      UNPROTECT(1);
99      return val;      return val;
100  }  }

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

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