Closed mdlincoln closed 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.
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 extenddistances::nearest_neighbor_search
so that it can progressively winnow down its search space so it doesn't go back to already-selected points.