boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
317 stars 203 forks source link

[Question] Is predecessor map in `astar_search<>()` redundant? #262

Open qbit86 opened 3 years ago

qbit86 commented 3 years ago

Why does API takes predecessor map as an argument? Anyway, it can be restored using the edge_relaxed visitor callback, right?

hdu-sdlzx commented 1 year ago

Maybe they are for different use cases? An argument provides a way for algorithm users to get results, and a callback is used by algorithm designers to use the function as building block. To me, callbacks are more powerful but arguments are easier to use.