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 1725, Wed Jan 17 08:01:10 2007 UTC revision 1736, Tue Jan 23 17:09:41 2007 UTC
# Line 79  Line 79 
79  #define PACKED_LENGTH(n)   ((n) * ((n) + 1))/2  #define PACKED_LENGTH(n)   ((n) * ((n) + 1))/2
80    
81  /* duplicate the slot with name given by sym from src to dest */  /* duplicate the slot with name given by sym from src to dest */
82    /* FIXME: is not yet used */
83  #define slot_dup(dest, src, sym)  SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))  #define slot_dup(dest, src, sym)  SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))
84    
85    #define slot_nonNull_dup(dest, src, sym)                        \
86        if(GET_SLOT(src, sym) != R_NilValue)                        \
87            SET_SLOT(dest, sym, duplicate(GET_SLOT(src, sym)))
88    
89    /* TODO: Make this faster for the case where dimnames = list(NULL,NULL)
90     *       and hence don't have to be set ! */
91    #define SET_DimNames(dest, src) slot_dup(dest, src, Matrix_DimNamesSym)
92    
93    
94  #define uplo_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_uploSym), 0))  #define uplo_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_uploSym), 0))
95  #define diag_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_diagSym), 0))  #define diag_P(_x_) CHAR(STRING_ELT(GET_SLOT(_x_, Matrix_diagSym), 0))
96  #define class_P(_x_) CHAR(asChar(getAttrib(_x_, R_ClassSymbol)))  #define class_P(_x_) CHAR(asChar(getAttrib(_x_, R_ClassSymbol)))

Legend:
Removed from v.1725  
changed lines
  Added in v.1736

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