SCM

SCM Repository

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

Diff of /pkg/src/dgTMatrix.c

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

revision 488, Wed Feb 2 19:11:51 2005 UTC revision 534, Tue Feb 8 08:59:31 2005 UTC
# Line 15  Line 15 
15          *xi = INTEGER(islot);          *xi = INTEGER(islot);
16    
17      if (length(xslot) != nnz || length(jslot) != nnz)      if (length(xslot) != nnz || length(jslot) != nnz)
18          return ScalarString(mkChar("lengths of slots i, j, and x must match"));          return mkString("lengths of slots i, j, and x must match");
19      if (length(dimslot) != 2)      if (length(dimslot) != 2)
20          return ScalarString(mkChar("slot Dim must have length 2"));          return mkString("slot Dim must have length 2");
21      nrow = dims[0]; ncol = dims[1];      nrow = dims[0]; ncol = dims[1];
22      for (j = 0; j < nnz; j++) {      for (j = 0; j < nnz; j++) {
23          if (xi[j] < 0 || xi[j] >= nrow)          if (xi[j] < 0 || xi[j] >= nrow)
24              return ScalarString(              return mkString("all row indices must be between 0 and nrow-1");
                 mkChar("all row indices must be between 0 and nrow-1"));  
25          if (xj[j] < 0 || xj[j] >= ncol)          if (xj[j] < 0 || xj[j] >= ncol)
26              return ScalarString(              return mkString("all column indices must be between 0 and ncol-1");
                 mkChar("all column indices must be between 0 and ncol-1"));  
27      }      }
28      return ScalarLogical(1);      return ScalarLogical(1);
29  }  }

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