Skip to content
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

Support for implicit graphs #29

Open
milasudril opened this issue Dec 1, 2022 · 1 comment
Open

Support for implicit graphs #29

milasudril opened this issue Dec 1, 2022 · 1 comment
Assignees

Comments

@milasudril
Copy link

Also a usecase for Dijkstra: https://github.com/milasudril/cheapest_route. In this case the graph is implicit. In particular, it will use 32 outgoing search directions. Also, it is not interesting to find the cost from the start pixel to every other pixel. You would rather pick a few pairs, and let the algorithm find a natural way connecting the vertices.

If you had to construct a graph using an adjacency list, you will most likely run out of memory. A solution to this is to make it possible somehow return the edges from a customization point, accepting a customized node id. In this case, the node id has to be the coordinates of the pixel. The cost function must be given two node id:s.

Searching the path to every point in the image is both space and time consuming. Thus, there must be a version of Dijkstra that stops at a requested vertex.

@lums658
Copy link
Collaborator

lums658 commented Dec 13, 2022

Having an implicit graph is part of the "bring you own graph" functionality that we intend to have for std::graph. Boost.Graph has this capability (see the knight's tour problem in the BGL book and on line https://www.boost.org/doc/libs/1_55_0/libs/graph/example/knights-tour.cpp).

The current interface definition for std::graph should be able to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants