Displaying 2 results from an estimated 2 matches for "annpoint".
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,N...
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,N...