By the "maximum bandwidth path" problem I mean finding path between two indicated vertices that maximizes the minimum weight that can be found on the path edges.
This problem can be solved by Dijkstra's Shortest Paths algorigh if we provide:
min for Combine funciton,
greater for Compare funciton
0 for the maximum possible weight,
numeric_limits<T>::max() for the minimum possible weight.
This Compiler Explorer example shows how this can be done with Boost.Graph.
This cannot be done with graph-v3, though, because it only allows customizing the first two (functions) but not the last two (special values). I cannot easily suggest a fix as it affects the design questions: how many arguments to an algorithm can you afford to have?
Also these forur values need to make sense together. They together form a concept. A concept with semantic constriants:
compare(w, min_weight) == false
compare(max_weight, w) == false
compare(combine(w, v), w) == false
compare(w, combine(w, min_weight)) == false
compare(max_weight, combine(max_weight, w)) == false
One option is to have these four travel together as one aggregate parameter.
By the "maximum bandwidth path" problem I mean finding path between two indicated vertices that maximizes the minimum weight that can be found on the path edges.
This problem can be solved by Dijkstra's Shortest Paths algorigh if we provide:
minforCombinefunciton,greaterforComparefunciton0for the maximum possible weight,numeric_limits<T>::max()for the minimum possible weight.This Compiler Explorer example shows how this can be done with Boost.Graph.
This cannot be done with graph-v3, though, because it only allows customizing the first two (functions) but not the last two (special values). I cannot easily suggest a fix as it affects the design questions: how many arguments to an algorithm can you afford to have?
Also these forur values need to make sense together. They together form a concept. A concept with semantic constriants:
compare(w, min_weight) == falsecompare(max_weight, w) == falsecompare(combine(w, v), w) == falsecompare(w, combine(w, min_weight)) == falsecompare(max_weight, combine(max_weight, w)) == falseOne option is to have these four travel together as one aggregate parameter.