Boost logo

Boost Users :

Subject: Re: [Boost-users] [Graph] Error in cuthill_mckee_ordering in 1.40
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-08-31 12:46:34


On Mon, 31 Aug 2009, Ryan W. Frenz wrote:

> I am attempting to upgrade to boost 1.40 and have found an issue with
> cuthill_mckee_ordering.hpp. The following code demonstrates the
> issue.
>
> #include <boost/graph/adjacency_matrix.hpp>
> #include <boost/graph/cuthill_mckee_ordering.hpp>
>
> int main() {
> typedef boost::property<boost::vertex_name_t, std::string> VertexProperty;
> typedef boost::adjacency_matrix<boost::undirectedS, VertexProperty> MyGraph;
> typedef boost::graph_traits<MyGraph>::vertex_descriptor Vertex;
>
> MyGraph graph(0);
>
> // Fill graph with nodes, etc....
>
> // Perform reverse cuthill mckee...
> std::vector<Vertex> inv_perm(boost::num_vertices(graph));
> {
> boost::cuthill_mckee_ordering(graph, inv_perm.rbegin()); //
> 'has_no_vertices' error...
> // do stuff with ordered graph...
> }
>
> return 0;
> }
>
> This code builds cleanly against 1.36 (my previous version) but fails
> when built against 1.40 with the following:
>
> ....boost/graph/cuthill_mckee_ordering.hpp(172): 'has_no_vertices':
> identifer not found
>
> Looking at the code, the function boost::cuthill_mckee_ordering is
> calling has_no_vertices (with no specified namespace).
> has_no_vertices (in graph_utility.hpp) lives in the boost::graph
> namespace. Changing the line to graph::has_no_vertices fixes the
> compiler error.
>
> Is this possibly a bug in 1.40 or am I doing something wrong?

This looks like a bug; do you have a small, self-contained example that
would demonstrate the problem? Could you please file it in Trac so we can
have a record of it and work on it? Thank you.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net