-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] KD-Tree #238
Comments
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. |
Hi @eloimaduell, thank you for sharing this feature request with us. I had a closer look at your project and it looks awesome! Really cool to hear about your experimentations with Graaf, we would love to work together on this feature as I think your project is the perfect use case for our library.
In general any I am not too familiar with KD-tree's myself, but I wonder if this is something which can be "implemented" on a normal tree data structure by assigning special node and edge values. Maybe by restricting a node to two child nodes (binary tree) and assigning Euclidian distances as edge values? For your project, would it work if we implement a tree data structure (which is a specialization of a |
Hi @bobluppes ! Thanks for taking in consideration our needs ! So glad !! |
Hi again, so today playing with the result of Prim's, trying to understand what is the order that the edges are returned, i found no specific order... As you might see on this screencapture, I'm painting the vertices of an EMST and also the edges in the order that I get them from the Prim's result. And it seems that the order of the edges doesn't follow any "usual" traversing order right ? I imagine that with the new feature that you have proposed those algorithms returning a tree structure (as a specialization of a graaf::graph as you mentioned), we might be able to apply traversal algorithms (for example to a resulting EMST tree) and develop new traversing algorithms right ? |
Thank you for the elaborate reply! In terms of working on this, I would propose that I implement a (prototypical) tree class which we can return from Prim's algorithm. If you are available to collaborate I think it does make sense to take a closer look at your use case, as I want to make sure that this feature closely fits your needs (and hopefully future use cases as well 😄). You are more than welcome to join our discord and we can discuss your use case further if you are interested. Logistic wise, introducing these changes means bumping a major version. So depending on how you include the Graaf dependency in your project I would provide a separate build artifact for you to try out. Once we are confident that the changed interfaces are mature enough I will include it in the next release of Graaf. |
Very cool to see your experimentations with the library! There actually is a specific order in which these edges are returned, but it is an implementation detail of the algorithm. As such I would not depend on it. But as you also stated, the order is not very useful now anyway.
Indeed! What I am currently thinking of is to implement a |
Just joined the Discord channel :) Let's continue there maybe ? I'm ok on working in a protoype way ... whatever it's more convenient for you. I can collaborate trying to express what might work for our use case, trying, debugging etc ... I'm using XCode and my projects are usually build as Openframeworks (http://www.openframeworks.cc) does ... As Graaf is header only it was quite easy to include the sources and it just worked. You know much more about the proper way to develop this feature and how to make it match you repo ... I'm ok if you send files and I just try them ... or whatevert ... let me know what might be better or more convenient for you and I'll try it. Excited !! |
Marking this issue as stale. It will not be automatically closed. Even though the maintainers of Graaf may not always have time to take a look in a timely fashion, your contributions are much appreciated. |
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.
The text was updated successfully, but these errors were encountered: