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 double

The target radius.

The data is owned by the caller of the method.
theta

Type: An array of double

The target theta.

The data is owned by the caller of the method.
phi

Type: An array of double

The target phi.

The data is owned by the caller of the method.
k

Type: const gint64

The number of nearest neighbors.

distances

Type: An array of double

The distances to the k nearest 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 long

The indices of the k nearest 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.