evenfurther / pathfinding

Pathfinding library for rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieving the next shortests paths from astar_bag

Kerollmops opened this issue · comments

Hello,

I am working with the astar_bag algorithm right now this is because I needed to retrieve all of the shortests paths. But I need one more thing, I would like to also retrieve the next shortest paths.

I am wondering how I could construct an astar_bag_iter or something that keep the state of the astar_bag and reuse it at each iteration.

let mut iter = astar_bag_iter(...);

assert_eq!(iter.next(), Some((0, ...)));
assert_eq!(iter.next(), Some((1, ...)));
assert_eq!(iter.next(), Some((2, ...)));
// ...
assert_eq!(iter.next(), None);

Do you think it could even be possible? I see that the min_cost is used to retrieve the shortests paths but is updated in place and bigger costs are not saved.

Can you help me a little bit?

Issue-Label Bot is automatically applying the label question to this issue, with a confidence of 0.76. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.