mdlincoln / pathway

Find Nearest-Neighbor Pathways Through Matrices
Other
1 stars 0 forks source link

Extend nearest neigbhor C code to do progressively unique searching #1

Closed mdlincoln closed 6 years ago

mdlincoln commented 6 years ago

The default navigate function navigate_unique is quite slow because each step drops out of C and has to consult R to figure out the next set of points it's allowed to search. While arbitrary navigator functions will always need to step back out into R, it would be useful to extend distances::nearest_neighbor_search so that it can progressively winnow down its search space so it doesn't go back to already-selected points.

mdlincoln commented 6 years ago

Alternative... for a path of n length, find n nearest neighbors for each point - this can all be done in underlying C. Selecting the top-ranked & unique points is then a quick matter once back in R. This would prevent needing to copy the matrix back and forth.