Closed majianjia closed 1 year ago
It's correct, that feature is not built it, since it's too specific and are too may ways to implement it.
One possible way to do it is with your custom metric/dataset adaptor class, which should have access to the list of already visited indices, then when asked for the coordinates of an already-visited point, just return some crazy large number, to ensure it will not be picked as the closest one...
My two cents :-)
Thanks for your reply. Not sure your 2 cents actually work but cost nothing to try :-)
I am trying to solve the Travel Salesmen Problem on some 2d points using a greedy algorithm. Where I have to mark which point has been visited. In this scenario, those points have been visited should be excluded when searing for the next nearest point.
I found nanoflann lacks of this kind of interface that for calling customized masks function. Am I right or I doing it wrong? Thanks