KristofferC / NearestNeighbors.jl

High performance nearest neighbor data structures (KDTree and BallTree) and algorithms for Julia.
Other
418 stars 65 forks source link

Reverse Cuthill-McKee ordering option #158

Closed kylebeggs closed 1 year ago

kylebeggs commented 1 year ago

Is there an option to relabel the inputs such that when you ask for the nearest neighbors it outputs the Reverse Cuthill-McKee (RCM) ordered indices? This would be super useful as right now I have to convert to a sparse matrix and then run RCM. I suppose it would make the knn() call pretty slow as you'd need to calculate then because RCM depends on k. Perhaps performing RCM on an adjacency list built by calling knn() for each point is better. Maybe Graphs.jl has this..?

kylebeggs commented 1 year ago

Looks like we can use this - https://github.com/PetrKryslUCSD/SymRCM.jl/blob/3b613473c936935b22992276fff94bdaa23955e4/src/SymRCM.jl#L134