bobluppes / graaf

A general-purpose lightweight C++ graph library
https://bobluppes.github.io/graaf/
MIT License
146 stars 38 forks source link

[FEAT] KD-Tree #238

Open eloimaduell opened 6 days ago

eloimaduell commented 6 days ago

Feature Request

Not sure if this is a feature request or just a comment / question on how I'm using graaf or how should I use it. I'm not a super expert on C++20, so the code it's not easy to read/understand for me...

I'd like to be able to navigate the Minimum Spanning Tree resulted from Prim's... I'm used to deal those kind of graphs by a "tree" data structure (KD-tree?) where i can start navigating from a leaf of the tree and then I can go to adjacent vertexs and navigate it in a custom way. Maybe this is already possible with graaf, or maybe it's totally non-sense, again, i'm not an expert on graph theory.

I'm using graaf to make some experiments related to a laser+sound show that we're developping in my studio : https://www.playmodes.com/home/astres/ . We're pointing and mapping a laser scanner to the night stars and we draw on top of them. As the sky is always moving, we have some methods to get the star coordinates inside the field of view of the laser, then i create a Delaunay triangulation and build an undirected graps from it, then I apply the EMST to get a "figure/graph" that contains all the stars and some edges, as this is a way that we create generative constellations.

Why is this important?

In my case it's important that the Resulting Minimum Spannig Tree it's easy to navigate in a custom way, accessing to leafs and then moving on to the tree structure. But, as said, maybe this is a very "personal" approach that doesn't apply to the scope of this library....

Describe the solution you'd like

that I can get as a result of the Prim's algoritm a Kd-Tree data structure.

Describe alternatives you've considered

As far as I can tell, the info I can get from a Prim's MST are a vector of the vertices and a vector a vector of the edges, without any morphologic information.

Additional context

Are you willing to contribute?

I'm not able to code in such a way as you do in graaf, sorry.

Checklist

Please check the following before submitting the issue:

Please note that feature requests are subject to review and may or may not be implemented in the library.

github-actions[bot] commented 6 days ago

Hi there! Thank you for creating your first issue on the Graaf library, we will look into it shortly. In the mean time, please make sure the issue has the correct labels set.