search for: annpointarray

Displaying 3 results from an estimated 3 matches for "annpointarray".

2007 Jul 10
1
How to preserve data across function calls in a library package
...double eps=asReal(Eps); SEXP ans,distance; SEXP retlist; PROTECT(ans=allocMatrix(INTSXP,nrow,k)); //The 2nd argument gives the number of rows, and the last the number of cols see http://cran.r- project.org/doc/manuals/R-exts.html PROTECT(distance=allocMatrix(REALSXP,nrow,k)); ANNpointArray datapoints; ANNpoint qpoint; ANNkd_tree* kdTree; book=Calloc(1,ANN*); foot=Calloc(1,int); book=kdTree; *foot=10; ....... } extern "C" { void do_foo(void){ foo(); } SEXP do_kNN_e(SEXP data, SEXP Nrow, SEXP Ncol,SEXP k,SEXP eps) { return kNN_e(data,Nrow,...
2007 Jul 10
1
How to preserve data across function calls in a library package
...double eps=asReal(Eps); SEXP ans,distance; SEXP retlist; PROTECT(ans=allocMatrix(INTSXP,nrow,k)); //The 2nd argument gives the number of rows, and the last the number of cols see http://cran.r- project.org/doc/manuals/R-exts.html PROTECT(distance=allocMatrix(REALSXP,nrow,k)); ANNpointArray datapoints; ANNpoint qpoint; ANNkd_tree* kdTree; book=Calloc(1,ANN*); foot=Calloc(1,int); book=kdTree; *foot=10; ....... } extern "C" { void do_foo(void){ foo(); } SEXP do_kNN_e(SEXP data, SEXP Nrow, SEXP Ncol,SEXP k,SEXP eps) { return kNN_e(data,Nrow,...
2001 Jul 02
0
ReleaseLargeFreeVectors SIGSEGV (?) (PR#1008)
...8a3d388, env=0x8a4326c) at dotcode.c:1310 #6 0x809136f in Rf_eval (e=0x8a3f098, rho=0x8a4326c) at eval.c:424 #7 0x8092a67 in do_set (call=0x8a3f044, op=0x819e8c4, args=0x8a3f060, rho=0x8a4326c) at eval.c:1092 .... and annDeallocPts() is the C++ deconstructor where: void annDeallocPts(ANNpointArray &pa) // deallocate points { delete [] pa[0]; // dealloc coordinate storage delete [] pa; // dealloc points pa = NULL; } platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 1...