SCM

SCM Repository

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

Diff of /pkg/src/dtrMatrix.c

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

revision 296, Mon Oct 4 17:13:29 2004 UTC revision 342, Mon Nov 15 13:55:52 2004 UTC
# Line 52  Line 52 
52  double set_rcond(SEXP obj, char *typstr)  double set_rcond(SEXP obj, char *typstr)
53  {  {
54      char typnm[] = {'\0', '\0'};      char typnm[] = {'\0', '\0'};
55      SEXP rcv = GET_SLOT(obj, install("rcond"));      SEXP rcv = GET_SLOT(obj, Matrix_rcondSym);
56      double rcond = get_double_by_name(rcv, typnm);      double rcond = get_double_by_name(rcv, typnm);
57    
58      typnm[0] = rcond_type(typstr);      typnm[0] = rcond_type(typstr);
# Line 65  Line 65 
65                           dims, &rcond,                           dims, &rcond,
66                           (double *) R_alloc(3*dims[0], sizeof(double)),                           (double *) R_alloc(3*dims[0], sizeof(double)),
67                           (int *) R_alloc(dims[0], sizeof(int)), &info);                           (int *) R_alloc(dims[0], sizeof(int)), &info);
68          SET_SLOT(obj, install("rcond"),          SET_SLOT(obj, Matrix_rcondSym,
69                   set_double_by_name(rcv, rcond, typnm));                   set_double_by_name(rcv, rcond, typnm));
70      }      }
71      return rcond;      return rcond;
# Line 136  Line 136 
136  {  {
137      SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("geMatrix")));      SEXP val = PROTECT(NEW_OBJECT(MAKE_CLASS("geMatrix")));
138    
139      SET_SLOT(val, install("rcond"),      SET_SLOT(val, Matrix_rcondSym,
140               duplicate(GET_SLOT(from, install("rcond"))));               duplicate(GET_SLOT(from, Matrix_rcondSym)));
141      SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(from, Matrix_xSym)));      SET_SLOT(val, Matrix_xSym, duplicate(GET_SLOT(from, Matrix_xSym)));
142      SET_SLOT(val, Matrix_DimSym,      SET_SLOT(val, Matrix_DimSym,
143               duplicate(GET_SLOT(from, Matrix_DimSym)));               duplicate(GET_SLOT(from, Matrix_DimSym)));
144        SET_SLOT(val, Matrix_factorization, allocVector(VECSXP, 0));
145      make_array_triangular(REAL(GET_SLOT(val, Matrix_xSym)), from);      make_array_triangular(REAL(GET_SLOT(val, Matrix_xSym)), from);
146      UNPROTECT(1);      UNPROTECT(1);
147      return val;      return val;

Legend:
Removed from v.296  
changed lines
  Added in v.342

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