[][src]Function flann_sys::flann_find_nearest_neighbors

pub unsafe extern "C" fn flann_find_nearest_neighbors(
    dataset: *mut f32,
    rows: c_int,
    cols: c_int,
    testset: *mut f32,
    trows: c_int,
    indices: *mut c_int,
    dists: *mut f32,
    nn: c_int,
    flann_params: *mut FLANNParameters
) -> c_int

Builds an index and uses it to find nearest neighbors.

Params: dataset = pointer to a data set stored in row major order rows = number of rows (features) in the dataset cols = number of columns in the dataset (feature dimensionality) testset = pointer to a query set stored in row major order trows = number of rows (features) in the query dataset (same dimensionality as features in the dataset) indices = pointer to matrix for the indices of the nearest neighbors of the testset features in the dataset (must have trows number of rows and nn number of columns) nn = how many nearest neighbors to return flann_params = generic flann parameters

Returns: zero or -1 for error