Having switched from boost_1_29_0 to boost_1_30_0, code that was compiling and running now produces this error message: I'm using Mandrake linux 9.0 with the gcc v3.22 compiler. /home/jholle/boost_1_30_0/boost/graph/connected_components.hpp: In function `boost::property_traits<IndexMap>::value_type boost::connected_components(const Graph&, ComponentMap) [with Graph = boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::GraphvizVertexProperty, boost::GraphvizEdgeProperty, boost::GraphvizGraphProperty, boost::listS> >, ComponentMap = boost::iterator_property_map<__gnu_cxx::__normal_iterator<size_t*, std::vector<size_t, std::allocator<size_t> > >, boost::subgraph_property_map<boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::GraphvizVertexProperty, boost::GraphvizEdgeProperty, boost::GraphvizGraphProperty, boost::listS> >*, boost::vec_adj_list_vertex_id_map<boost::GraphvizVertexProperty, size_t> >, unsigned int, unsigned int&>]': BGLLayout.cpp:49: instantiated from here /home/jholle/boost_1_30_0/boost/graph/connected_components.hpp:99: `sizeof' applied to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>' The code that produced this error is: void BGLLayout::FindComponents(void) { typedef vector<unsigned int> Ints; Ints c(num_vertices(m_graph)); connected_components(m_graph, make_iterator_property_map(c.begin(), get(vertex_index, m_graph), c[0])); << -- line 49 (error source) m_componentStartVertex.clear(); unsigned int i=0; for (Ints::const_iterator iter=c.begin(); iter != c.end(); ++iter,++i) if (m_componentStartVertex.size() <= *iter) m_componentStartVertex.push_back(i); } Note this code is largely taken from connected_components.cpp. Can anybody tell me what is wrong here?
I avoid this error by commented out the the ASSERT on line 99 of boost_1_30_0/boost/graph/connected_components.hpp. The program works as before, giving the correct answer. I know this isn't a solution, so I really hope to hear the correct one... Thanks in advance. Jeff Holle wrote:
Having switched from boost_1_29_0 to boost_1_30_0, code that was compiling and running now produces this error message:
I'm using Mandrake linux 9.0 with the gcc v3.22 compiler.
/home/jholle/boost_1_30_0/boost/graph/connected_components.hpp: In function `boost::property_traits<IndexMap>::value_type boost::connected_components(const Graph&, ComponentMap) [with Graph = boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::GraphvizVertexProperty, boost::GraphvizEdgeProperty, boost::GraphvizGraphProperty, boost::listS> >, ComponentMap = boost::iterator_property_map<__gnu_cxx::__normal_iterator<size_t*, std::vector<size_t, std::allocator<size_t> > >,
boost::subgraph_property_map<boost::subgraph<boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, boost::GraphvizVertexProperty, boost::GraphvizEdgeProperty, boost::GraphvizGraphProperty, boost::listS> >*, boost::vec_adj_list_vertex_id_map<boost::GraphvizVertexProperty, size_t> >, unsigned int, unsigned int&>]': BGLLayout.cpp:49: instantiated from here /home/jholle/boost_1_30_0/boost/graph/connected_components.hpp:99: `sizeof' applied to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>'
The code that produced this error is:
void BGLLayout::FindComponents(void) { typedef vector<unsigned int> Ints; Ints c(num_vertices(m_graph)); connected_components(m_graph, make_iterator_property_map(c.begin(), get(vertex_index, m_graph), c[0])); << -- line 49 (error source) m_componentStartVertex.clear(); unsigned int i=0; for (Ints::const_iterator iter=c.begin(); iter != c.end(); ++iter,++i) if (m_componentStartVertex.size() <= *iter) m_componentStartVertex.push_back(i); }
Note this code is largely taken from connected_components.cpp. Can anybody tell me what is wrong here?
*Yahoo! Groups Sponsor* ADVERTISEMENT <http://rd.yahoo.com/M=246920.2960106.4328965.2848452/D=egroupweb/S=1705006788:HM/A=1508984/R=2/id=noscript/*http://www.gotomypc.com/u/tr/yh/cpm/grp/300_02F/g22lp?Target=mm/g22lp.tmpl>
Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@yahoogroups.com>
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/>.
Hi Jeff, Jeff Holle wrote:
I avoid this error by commented out the the ASSERT on line 99 of boost_1_30_0/boost/graph/connected_components.hpp. The program works as before, giving the correct answer. I know this isn't a solution, so I really hope to hear the correct one... Thanks in advance.
Looking at CVS logs I see: revision 1.15 date: 2003/02/07 08:56:15; author: vladimir_prus; state: Exp; lines: +8 -0 Assert that connected_component is called on undirected graph, per docs. I really think that the change was correct. Docs clearly state that the algorithm can be applied only to undirected graphs. Morever, I added the assert because I run into a bug because of it (don't remember details now, sorry). Why 'strong_components' won't do, for directed graph? - Volodya
Conceptionly, I see why you think this change is right, but... I'm using a Bidirection graph (actually a GraphvizDiagraph), not a directional graph. I have attempted to use strongly_connected and it just doesn't come up with the answer that my FindComponents method requires. So I need to continue using connected_components. Vladimir Prus wrote:
Hi Jeff,
Jeff Holle wrote:
I avoid this error by commented out the the ASSERT on line 99 of boost_1_30_0/boost/graph/connected_components.hpp. The program works as before, giving the correct answer. I know this isn't a solution, so I really hope to hear the correct one... Thanks in advance.
Looking at CVS logs I see:
revision 1.15 date: 2003/02/07 08:56:15; author: vladimir_prus; state: Exp; lines: +8 -0 Assert that connected_component is called on undirected graph, per docs.
I really think that the change was correct. Docs clearly state that the algorithm can be applied only to undirected graphs. Morever, I added the assert because I run into a bug because of it (don't remember details now, sorry). Why 'strong_components' won't do, for directed graph?
- Volodya
*Yahoo! Groups Sponsor* ADVERTISEMENT <http://rd.yahoo.com/M=246920.2960106.4328965.2848452/D=egroupweb/S=1705006788:HM/A=1508991/R=2/id=noscript/*http://www.gotomypc.com/u/tr/yh/cpm/grp/300_06F/g22lp?Target=mm/g22lp.tmpl>
Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@yahoogroups.com>
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/>.
Jeff Holle wrote:
Conceptionly, I see why you think this change is right, but... I'm using a Bidirection graph (actually a GraphvizDiagraph), not a directional graph.
I believe that bidirectional graph is directional graph which knows all incoming edges for a vertex. IOW, there's additional operation which will work on bidirectional graph, but in all the other ways it's the same as directional.
I have attempted to use strongly_connected and it just doesn't come up with the answer that my FindComponents method requires. So I need to continue using connected_components.
I don't know what could be wrong --- your description is too brief. strong_components should work on bidirectional graphs. It it does not, it's a bug, but you'd need to show the bug in order to have it fixed ;-) - Volodya
On Wed, 26 Mar 2003, Jeff Holle wrote:
/home/jholle/boost_1_30_0/boost/graph/connected_components.hpp:99: `sizeof' applied to incomplete type `boost::STATIC_ASSERTION_FAILURE<false>'
The code that produced this error is:
void BGLLayout::FindComponents(void) { typedef vector<unsigned int> Ints; Ints c(num_vertices(m_graph)); connected_components(m_graph, make_iterator_property_map(c.begin(), get(vertex_index, m_graph), c[0])); << -- line 49 (error source) m_componentStartVertex.clear(); unsigned int i=0; for (Ints::const_iterator iter=c.begin(); iter != c.end(); ++iter,++i) if (m_componentStartVertex.size() <= *iter) m_componentStartVertex.push_back(i); }
Note this code is largely taken from connected_components.cpp. Can anybody tell me what is wrong here?
The error is that the concept check BOOST_STATIC_ASSERT((boost::is_same<directed, undirected_tag>::value)); is failing, meaning that your graph is not undirected (i.e., it is bidirectional or directed). You probably want the strong_components algorithm. Doug
participants (3)
-
Douglas Paul Gregor
-
Jeff Holle
-
Vladimir Prus