
Is ith_bandwidth broken? It only measures the distance between indices when the source is greater than the sink. Should it look like this: template <typename Graph, typename VertexIndexMap> typename graph_traits<Graph>::vertices_size_type ith_bandwidth(typename graph_traits<Graph>::vertex_descriptor i, const Graph& g, VertexIndexMap index) { BOOST_USING_STD_MAX(); typedef typename graph_traits<Graph>::vertices_size_type size_type; size_type b = 0; typename graph_traits<Graph>::out_edge_iterator e, end; for (boost::tie(e, end) = out_edges(i, g); e != end; ++e) { int f_i = get(index, i); int f_j = get(index, target(*e, g)); using namespace std; // to call abs() unqualified if(f_i > f_j) b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, size_type(f_i - f_j)); else b = max BOOST_PREVENT_MACRO_SUBSTITUTION (b, size_type(f_j - f_i)); } return b; } Joel

Joel Young <jdy <at> cryregarder.com> writes:
Is ith_bandwidth broken? It only measures the distance between indices when the source is greater than the sink. Should it look like this:
For closure, I reported this as https://svn.boost.org/trac/boost/ticket/5665 with a patch and it has been fixed. Joel
participants (2)
-
Cry
-
Joel Young