$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-09-08 16:29:24
From: <jsiek_at_[hidden]>
> This approach has the advantage that the same functor, say
> predecessor_recorder, could be used with different algorithms
> at different event points.
>
> dijkstra_shortest_paths(...,
> make_pair(make_pair(record_predecessors(p), explore_edge_tag()),
> null_visitor())
> );
>
> bellman_ford_shortest_paths(...,
> make_pair(make_pair(record_predecessors(p), relax_tag()),
> null_visitor())
> );
>
I like where you're going with this. Usage-wise, the prevalence of make_pair
here puts me off a bit. Would it be possible to do something like what we've
done in operators.hpp to determine whether a pair's SecondType is a tag?
Then maybe we could write
dijkstra_shortest_paths(...,
make_pair(record_predecessors(p), explore_edge_tag())
);
In fact, it would be nicest to write
dijkstra_shortest_paths(...,
record_predecessors(p, explore_edge_tag())
);
Also, I would rename these tag types "on_..." instead of "..._tag", e.g.
"on_explore_edge()".
-Dave