search for: dimxy

Displaying 2 results from an estimated 2 matches for "dimxy".

Did you mean: dimx
2012 Dec 15
3
interfacing with .Call
Hi My code is as following: #include <R.h> #include <Rinternals.h> //* the Projector part *// void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int *dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum) { ...} //* the interface part *// #define getDim(A) INTEGER(coerceVector(getAttrib(A,R_DimSymbol), INTSXP)) SEXP Projector5(SEXP L, SEXP G, SEXP W, SEXP xymod, SEXP modif) { //* digest SEXPs from R *// int *dimL, *dimG, *dimW, *dimxy, *dimif;...
2012 Dec 06
1
Use .Call interface
...MERIC(modif));nprot++; double *lptr; lptr=REAL(L); double *gptr; gptr=REAL(G); double *wptr; wptr=REAL(W); int *xyptr; xyptr=INTEGER(xymod); double *ifptr; ifptr=REAL(modif); int *dimL; dimL=INTEGER(GET_DIM(L)); int *dimG; dimG=INTEGER(GET_DIM(G)); int *dimW; dimW=INTEGER(GET_DIM(W)); int *dimxy; dimxy=INTEGER(GET_DIM(xymod)); int *dimif; dimif=INTEGER(GET_DIM(modif)); SEXP ans; PROTECT(ans=allocMatrix(REALSXP, dimG[0], dimL[1])); nprot++; double *ansptr; ansptr=REAL(ans); Projector(lptr, dimL, gptr, dimG, wptr, dimW, xyptr, dimxy, ifptr, dimif, ansptr); UNPROTECT(nprot); return ans...