SCM

SCM Repository

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

Diff of /pkg/src/dgeMatrix.c

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

revision 692, Mon Apr 18 14:34:33 2005 UTC revision 700, Mon Apr 18 20:21:04 2005 UTC
# Line 82  Line 82 
82      SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("dpoMatrix")));      SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("dpoMatrix")));
83      int *Dims = INTEGER(GET_SLOT(x, Matrix_DimSym)),      int *Dims = INTEGER(GET_SLOT(x, Matrix_DimSym)),
84          *vDims = INTEGER(ALLOC_SLOT(val, Matrix_DimSym, INTSXP, 2));          *vDims = INTEGER(ALLOC_SLOT(val, Matrix_DimSym, INTSXP, 2));
85      int i, k = tr ? Dims[1] : Dims[0], n = tr ? Dims[0] : Dims[1];      int k = tr ? Dims[1] : Dims[0], n = tr ? Dims[0] : Dims[1];
86      double one = 1.0, *xvals, zero = 0.0;      double one = 1.0, zero = 0.0;
87    
88      SET_SLOT(val, Matrix_uploSym, mkString("U"));      SET_SLOT(val, Matrix_uploSym, mkString("U"));
89      vDims[0] = vDims[1] = n;      vDims[0] = vDims[1] = n;
# Line 183  Line 183 
183                       dims,                       dims,
184                       INTEGER(ALLOC_SLOT(val, Matrix_permSym, INTSXP, npiv)),                       INTEGER(ALLOC_SLOT(val, Matrix_permSym, INTSXP, npiv)),
185                       &info);                       &info);
186      if (info)      if (info < 0)
187          error(_("Lapack routine %s returned error code %d"), "dgetrf", info);          error(_("Lapack routine %s returned error code %d"), "dgetrf", info);
188        else if (info > 0)
189            warning(_("Exact singularity detected during LU decomposition."));
190      UNPROTECT(1);      UNPROTECT(1);
191      return set_factors(x, val, "LU");      return set_factors(x, val, "LU");
192  }  }

Legend:
Removed from v.692  
changed lines
  Added in v.700

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