SCM

SCM Repository

[matrix] Diff of /pkg/Matrix/src/Mutils.h
ViewVC logotype

Diff of /pkg/Matrix/src/Mutils.h

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

revision 2114, Mon Feb 18 17:15:41 2008 UTC revision 2115, Sat Feb 23 09:23:17 2008 UTC
# Line 57  Line 57 
57  SEXP as_det_obj(double val, int log, int sign);  SEXP as_det_obj(double val, int log, int sign);
58  SEXP get_factors(SEXP obj, char *nm);  SEXP get_factors(SEXP obj, char *nm);
59  SEXP set_factors(SEXP obj, SEXP val, char *nm);  SEXP set_factors(SEXP obj, SEXP val, char *nm);
60    
61    #if 0
62  SEXP dgCMatrix_set_Dim(SEXP x, int nrow);  SEXP dgCMatrix_set_Dim(SEXP x, int nrow);
63    #endif  /* unused */
64    
65  /* int csc_unsorted_columns(int ncol, const int p[], const int i[]); */  /* int csc_unsorted_columns(int ncol, const int p[], const int i[]); */
66  /* void csc_sort_columns(int ncol, const int p[], int i[], double x[]); */  /* void csc_sort_columns(int ncol, const int p[], int i[], double x[]); */
# Line 117  Line 120 
120  /* should also work for "matrix" matrices: */  /* should also work for "matrix" matrices: */
121  #define Real_KIND(_x_)  (IS_S4_OBJECT(_x_) ? Real_kind(_x_) : \  #define Real_KIND(_x_)  (IS_S4_OBJECT(_x_) ? Real_kind(_x_) : \
122                           (isReal(_x_) ? 0 : (isLogical(_x_) ? 1 : -1)))                           (isReal(_x_) ? 0 : (isLogical(_x_) ? 1 : -1)))
123    /* This one gives '0' also for integer "matrix" :*/
124    #define Real_KIND2(_x_) (IS_S4_OBJECT(_x_) ? Real_kind(_x_) : \
125                             (isLogical(_x_) ? 1 : 0))
126    
127  /* requires 'x' slot: */  /* requires 'x' slot: */
128  #define Real_kind(_x_)  (isReal(GET_SLOT(_x_, Matrix_xSym)) ? 0 :       \  #define Real_kind(_x_)  (isReal(GET_SLOT(_x_, Matrix_xSym)) ? 0 :       \
129                           (isLogical(GET_SLOT(_x_, Matrix_xSym)) ? 1 : -1))                           (isLogical(GET_SLOT(_x_, Matrix_xSym)) ? 1 : -1))
130    
131    #define DECLARE_AND_GET_X_SLOT(__C_TYPE, __SEXP)        \
132        __C_TYPE *xx = __SEXP(GET_SLOT(x, Matrix_xSym))
133    
134    
135  /**  /**
136   * Check for valid length of a packed triangular array and return the   * Check for valid length of a packed triangular array and return the

Legend:
Removed from v.2114  
changed lines
  Added in v.2115

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