Method
NumCosmoMathSphereNNknn_search_distances
Declaration [src]
void
ncm_sphere_nn_knn_search_distances (
NcmSphereNN* snn,
const gdouble r,
const gdouble theta,
const gdouble 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. The output distances are sorted in
ascending order and are squared. The output indices are sorted in the same order
as the distances.
Parameters
r-
Type:
const gdoubleThe target radius.
theta-
Type:
const gdoubleThe target theta.
phi-
Type:
const gdoubleThe target phi.
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.