graph-v2 icon indicating copy to clipboard operation
graph-v2 copied to clipboard

Is `compare` argument in `dijkstra_shortest_distances` underconstrained?

Open akrzemi1 opened this issue 6 months ago • 0 comments

Algorithm dijkstra_shortest_distances (and probably others) allows me to provide a custom compare function. It is only constrained (syntactically and semantically) by concept basic_edge_weight_function.

What are the intended usages? It looks like I can provide std::greater and be compliant with all the constraints, but looking at the implementation, this couldn't possibly work. So I guess either the algorithm should put more constraints on compare, or the algorithm changed.

akrzemi1 avatar Jun 16 '25 14:06 akrzemi1