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 533, Tue Feb 8 07:30:59 2005 UTC revision 534, Tue Feb 8 08:59:31 2005 UTC
# Line 9  Line 9 
9      int m, n;      int m, n;
10    
11      if (length(Dim) != 2)      if (length(Dim) != 2)
12          return ScalarString(mkChar("Dim slot must have length 2"));          return mkString("Dim slot must have length 2");
13      m = INTEGER(Dim)[0]; n = INTEGER(Dim)[1];      m = INTEGER(Dim)[0]; n = INTEGER(Dim)[1];
14      if (m < 0 || n < 0)      if (m < 0 || n < 0)
15          return ScalarString(mkChar("Negative value(s) in Dim"));          return mkString("Negative value(s) in Dim");
16      if (length(x) != m * n)      if (length(x) != m * n)
17          return ScalarString(mkChar("length of x slot != prod(Dim)"));          return mkString("length of x slot != prod(Dim)");
18      if (length(fact) > 0 && getAttrib(fact, R_NamesSymbol) == R_NilValue)      if (length(fact) > 0 && getAttrib(fact, R_NamesSymbol) == R_NilValue)
19          return ScalarString(mkChar("factors slot must be named list"));          return mkString("factors slot must be named list");
20      if (length(rc) > 0 && getAttrib(rc, R_NamesSymbol) == R_NilValue)      if (length(rc) > 0 && getAttrib(rc, R_NamesSymbol) == R_NilValue)
21          return ScalarString(mkChar("rcond slot must be named numeric vector"));          return mkString("rcond slot must be named numeric vector");
22      return ScalarLogical(1);      return ScalarLogical(1);
23  }  }
24    
# Line 85  Line 85 
85    
86      SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));      SET_SLOT(val, Matrix_factorSym, allocVector(VECSXP, 0));
87      SET_SLOT(val, Matrix_rcondSym, allocVector(REALSXP, 0));      SET_SLOT(val, Matrix_rcondSym, allocVector(REALSXP, 0));
88      SET_SLOT(val, Matrix_uploSym, ScalarString(mkChar("U")));      SET_SLOT(val, Matrix_uploSym, mkString("U"));
89      SET_SLOT(val, Matrix_DimSym, allocVector(INTSXP, 2));      SET_SLOT(val, Matrix_DimSym, allocVector(INTSXP, 2));
90      vDims = INTEGER(GET_SLOT(val, Matrix_DimSym));      vDims = INTEGER(GET_SLOT(val, Matrix_DimSym));
91      vDims[0] = vDims[1] = n;      vDims[0] = vDims[1] = n;

Legend:
Removed from v.533  
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