Dear Jeremy, et al,
I am trying to implement a shortest paths algorithm on
a directed graph.
As I have unit edge weights, I would rather use breadth_first_search
rather than dijkstra.
// Is this a good candidate for addition?
template
struct vertex_marker
: public boost::base_visitor >
{
typedef Tag event_filter;
vertex_marker(Map p_map,int p_val) : m_map(p_map),m_val(p_val) { }
template
void operator()(Vertex v,const Graph&) {
boost::put(m_map,v,m_val);
}
Map m_map;
int m_val;
};
template
vertex_marker