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 476, Wed Feb 2 11:51:24 2005 UTC revision 478, Wed Feb 2 14:33:51 2005 UTC
# Line 1  Line 1 
1  /* Sparse matrices in triplet form */  /* Sparse matrices in triplet form */
2  #include "triplet.h"  #include "dgTMatrix.h"
3    
4  SEXP triplet_validate(SEXP x)  SEXP dgTMatrix_validate(SEXP x)
5  {  {
6      SEXP      SEXP
7          islot = GET_SLOT(x, Matrix_iSym),          islot = GET_SLOT(x, Matrix_iSym),
# Line 31  Line 31 
31  }  }
32    
33  static void  static void
34  insert_triplets_in_array(int m, int n, int nnz,  insert_dgTMatrixs_in_array(int m, int n, int nnz,
35                           const int xi[], const int xj[], const double xx[],                           const int xi[], const int xj[], const double xx[],
36                           double vx[])                           double vx[])
37  {  {
# Line 42  Line 42 
42      }      }
43  }  }
44    
45  SEXP triplet_to_geMatrix(SEXP x)  SEXP dgTMatrix_to_dgeMatrix(SEXP x)
46  {  {
47      SEXP dd = GET_SLOT(x, Matrix_DimSym),      SEXP dd = GET_SLOT(x, Matrix_DimSym),
48          islot = GET_SLOT(x, Matrix_iSym),          islot = GET_SLOT(x, Matrix_iSym),
49          ans = PROTECT(NEW_OBJECT(MAKE_CLASS("geMatrix")));          ans = PROTECT(NEW_OBJECT(MAKE_CLASS("dgeMatrix")));
50    
51      int *dims = INTEGER(dd),      int *dims = INTEGER(dd),
52          m = dims[0],          m = dims[0],
# Line 64  Line 64 
64      return ans;      return ans;
65  }  }
66    
67  SEXP triplet_to_matrix(SEXP x)  SEXP dgTMatrix_to_matrix(SEXP x)
68  {  {
69      SEXP dd = GET_SLOT(x, Matrix_DimSym),      SEXP dd = GET_SLOT(x, Matrix_DimSym),
70          islot = GET_SLOT(x, Matrix_iSym);          islot = GET_SLOT(x, Matrix_iSym);

Legend:
Removed from v.476  
changed lines
  Added in v.478

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