SCM

SCM Repository

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

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

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

revision 534, Tue Feb 8 08:59:31 2005 UTC revision 582, Mon Feb 28 18:15:21 2005 UTC
# Line 8  Line 8 
8    
9      /* quick but nondefinitive check on positive definiteness */      /* quick but nondefinitive check on positive definiteness */
10      for (i = 0; i < n; i++)      for (i = 0; i < n; i++)
11          if (x[i * np1] < 0) return mkString("dpoMatrix is not positive definite");          if (x[i * np1] < 0)
12                return mkString(_("dpoMatrix is not positive definite"));
13      return ScalarLogical(1);      return ScalarLogical(1);
14  }  }
15    
# Line 30  Line 31 
31      SET_SLOT(val, Matrix_DimSym, duplicate(dimP));      SET_SLOT(val, Matrix_DimSym, duplicate(dimP));
32      F77_CALL(dpotrf)(CHAR(asChar(uploP)), dims,      F77_CALL(dpotrf)(CHAR(asChar(uploP)), dims,
33                       REAL(GET_SLOT(val, Matrix_xSym)), dims, &info);                       REAL(GET_SLOT(val, Matrix_xSym)), dims, &info);
34      if (info) error("Lapack routine dpotrf returned error code %d", info);      if (info) error(_("Lapack routine dpotrf returned error code %d"), info);
35      UNPROTECT(1);      UNPROTECT(1);
36      return set_factors(x, val, "Cholesky");      return set_factors(x, val, "Cholesky");
37  }  }
# Line 89  Line 90 
90          info;          info;
91    
92      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)
93          error("Dimensions of system to be solved are inconsistent");          error(_("Dimensions of system to be solved are inconsistent"));
94      SET_SLOT(val, Matrix_rcondSym, allocVector(REALSXP, 0));      SET_SLOT(val, Matrix_rcondSym, allocVector(REALSXP, 0));
95      SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));      SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));
96      SET_SLOT(val, Matrix_DimSym, duplicate(GET_SLOT(b, Matrix_DimSym)));      SET_SLOT(val, Matrix_DimSym, duplicate(GET_SLOT(b, Matrix_DimSym)));
# Line 112  Line 113 
113          info;          info;
114    
115      if (!(isReal(b) && isMatrix(b)))      if (!(isReal(b) && isMatrix(b)))
116          error("Argument b must be a numeric matrix");          error(_("Argument b must be a numeric matrix"));
117      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)      if (*adims != *bdims || bdims[1] < 1 || *adims < 1)
118          error("Dimensions of system to be solved are inconsistent");          error(_("Dimensions of system to be solved are inconsistent"));
119      F77_CALL(dpotrs)(CHAR(asChar(GET_SLOT(Chol, Matrix_uploSym))),      F77_CALL(dpotrs)(CHAR(asChar(GET_SLOT(Chol, Matrix_uploSym))),
120                       adims, bdims + 1,                       adims, bdims + 1,
121                       REAL(GET_SLOT(Chol, Matrix_xSym)), adims,                       REAL(GET_SLOT(Chol, Matrix_xSym)), adims,

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

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