Method
NumCosmoMathSphereNNknn_search_distances_batch
Declaration [src]
void
ncm_sphere_nn_knn_search_distances_batch (
NcmSphereNN* snn,
GArray* r,
GArray* theta,
GArray* phi,
const gint64 k,
GArray** distances,
GArray** indices
)
Description [src]
Computes the k nearest neighbors of the target point (theta, phi) and stores the
distances and indices in distances and indices, respectively. The distances are
Euclidean distances in the 3D space squared.
Parameters
r-
Type: An array of
doubleThe target radius.
The data is owned by the caller of the method. theta-
Type: An array of
doubleThe target theta.
The data is owned by the caller of the method. phi-
Type: An array of
doubleThe target phi.
The data is owned by the caller of the method. k-
Type:
const gint64The number of nearest neighbors.
distances-
Type: An array of
doubleThe distances to the
knearest neighbors.The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it. indices-
Type: An array of
longThe indices of the
knearest neighbors.The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it.