MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / nearestNeighbour

Function nearestNeighbour

src/api/cpp/nearest_neighbour.cpp:16–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace af {
15
16void nearestNeighbour(array& idx, array& dist, const array& query,
17 const array& train, const dim_t dist_dim,
18 const unsigned n_dist, const af_match_type dist_type) {
19 af_array temp_idx = 0;
20 af_array temp_dist = 0;
21 AF_THROW(af_nearest_neighbour(&temp_idx, &temp_dist, query.get(),
22 train.get(), dist_dim, n_dist, dist_type));
23 idx = array(temp_idx);
24 dist = array(temp_dist);
25}
26
27} // namespace af

Callers 2

TESTFunction · 0.85
TEST_PFunction · 0.85

Calls 3

af_nearest_neighbourFunction · 0.50
arrayClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected