SCM

SCM Repository

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

Diff of /pkg/src/HBMM.c

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

revision 1866, Mon Jun 4 17:11:11 2007 UTC revision 1867, Mon Jun 4 17:13:02 2007 UTC
# Line 47  Line 47 
47    
48  SEXP Matrix_writeMatrixMarket(SEXP obj, SEXP file, SEXP typep)  SEXP Matrix_writeMatrixMarket(SEXP obj, SEXP file, SEXP typep)
49  {  {
50      char *type = CHAR(asChar(typep));      const char *type = CHAR(asChar(typep));
51        char *ff = strdup(CHAR(asChar(file)));
52      int *dims = INTEGER(GET_SLOT(obj, Matrix_DimSym)),      int *dims = INTEGER(GET_SLOT(obj, Matrix_DimSym)),
53          *ii = (int *) NULL, *jj = (int *) NULL;          *ii = (int *) NULL, *jj = (int *) NULL;
54      int M = dims[0], N = dims[1], i, nz = -1, *src;      int M = dims[0], N = dims[1], i, nz = -1, *src;
# Line 88  Line 89 
89      }      }
90      if (!jj) error("storage mode must be T or C");      if (!jj) error("storage mode must be T or C");
91    
92      mm_write_mtx_crd(CHAR(asChar(file)), M, N, nz, ii, jj, xx,      mm_write_mtx_crd(ff, M, N, nz, ii, jj, xx, matcode);
                      matcode);  
93    
94      Free(ii); Free(jj);      Free(ii); Free(jj); free(ff);
95      return R_NilValue;      return R_NilValue;
96    
97  }  }

Legend:
Removed from v.1866  
changed lines
  Added in v.1867

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