SCM

SCM Repository

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

Diff of /pkg/src/Mutils.h

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

revision 1394, Sat Aug 19 12:16:16 2006 UTC revision 1416, Tue Aug 22 22:44:14 2006 UTC
# Line 305  Line 305 
305  SEXP alloc_dtrMatrix(int n, char *uplo, char *diag, SEXP rownms, SEXP colnms);  SEXP alloc_dtrMatrix(int n, char *uplo, char *diag, SEXP rownms, SEXP colnms);
306  SEXP alloc_dsCMatrix(int n, int nz, char *uplo, SEXP rownms, SEXP colnms);  SEXP alloc_dsCMatrix(int n, int nz, char *uplo, SEXP rownms, SEXP colnms);
307    
308    SEXP dup_mMatrix_as_dgeMatrix(SEXP A, SEXP classed);
309    
310    
311    /**
312     * Return the 0-based index of a string match in a vector of strings
313     * terminated by an empty string.  Returns -1 for no match.
314     *
315     * @param dest class string to match
316     * @param valid vector of possible matches terminated by an empty string
317     *
318     * @return index of match or -1 for no match
319     */
320    static R_INLINE int
321    Matrix_check_class(char *class, char **valid)
322    {
323        int ans;
324        for (ans = 0; ; ans++) {
325            if (!strlen(valid[ans])) return -1;
326            if (!strcmp(class, valid[ans])) return ans;
327        }
328    }
329    
330  #ifdef __cplusplus  #ifdef __cplusplus
331  }  }
332  #endif  #endif

Legend:
Removed from v.1394  
changed lines
  Added in v.1416

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