val = (double*)MALLOC(sizeof(double)*nPts*k*2);
#ifdef HAVE_ANN
- nearest_neighbor_graph_ann(nPts, num_neigbors, eps, x, &nz, &irn, &jcn, &val);
+ nearest_neighbor_graph_ann(nPts, num_neigbors, eps, x, &nz, irn, jcn, val);
A = SparseMatrix_from_coordinate_arrays(nz, nPts, nPts, irn, jcn, val, MATRIX_TYPE_REAL, sizeof(double));
#else
}
}
-void nearest_neighbor_graph_ann(int nPts, int k, double eps, double *x, int *nz0, int **irn0, int **jcn0, double **val0){
+void nearest_neighbor_graph_ann(int nPts, int k, double eps, double *x, int *nz0, int *irn0, int *jcn0, double *val0){
/* Gives a nearest neighbor graph is a list of dim-dimendional points. The connectivity is in irn/jcn, and the distance in val.
note that there could be repeates
*/
- int *irn = *irn0;
- int *jcn = *jcn0;
- double *val = *val0;
+ int *irn = irn0;
+ int *jcn = jcn0;
+ double *val = val0;
ANNpointArray dataPts = annAllocPts(nPts, dim); // allocate data points
extern "C" {
#endif
-void nearest_neighbor_graph_ann(int nPts, int k, double eps, double *x, int *nz0, int **irn0, int **jcn0, double **val0);
+void nearest_neighbor_graph_ann(int nPts, int k, double eps, double *x, int *nz0, int *irn0, int *jcn0, double *val0);
#ifdef __cplusplus
}