[BGL] inv_adjacency_iterator is missing in graph_traits.hpp
Hi, I have a bidirectional adjacency list and I want to use the inv_adjacent_vertices method However, the following code does not compile: typedef boost::graph_traits<Graph> Traits; typedef typename Traits::inv_adjacency_iterator inv_adjacency_iterator; inv_adjacency_iterator w, w_end; boost::tie (w, w_end) = inv_adjacent_vertices (v, g_); The problem is that inv_adjacency_iterator is not part of boost::graph_traits :-( Could you tell me how can I use the inv_adjacent_vertices method (i.e., how can I declare an inv_adjacent_iterator)? Thanks. Best regards, P.S.: I tried to use an adjacency_iterator instead but it does not work. -- Johan () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Hi again,
On Mon, Jul 23, 2012 at 6:15 PM, Johan Oudinet
Hi,
I have a bidirectional adjacency list and I want to use the inv_adjacent_vertices method However, the following code does not compile: typedef boost::graph_traits<Graph> Traits; typedef typename Traits::inv_adjacency_iterator inv_adjacency_iterator; inv_adjacency_iterator w, w_end; boost::tie (w, w_end) = inv_adjacent_vertices (v, g_);
The problem is that inv_adjacency_iterator is not part of boost::graph_traits :-(
Could you tell me how can I use the inv_adjacent_vertices method (i.e., how can I declare an inv_adjacent_iterator)?
Obviously, I found a workaround 2 minutes after sending this email...
which consist in using the inv_adjacency_iterator_generator:
typedef typename boost::inv_adjacency_iterator_generator
On Mon, 23 Jul 2012, Johan Oudinet wrote:
Hi again,
On Mon, Jul 23, 2012 at 6:15 PM, Johan Oudinet
wrote: Hi,
I have a bidirectional adjacency list and I want to use the inv_adjacent_vertices method However, the following code does not compile: typedef boost::graph_traits<Graph> Traits; typedef typename Traits::inv_adjacency_iterator inv_adjacency_iterator; inv_adjacency_iterator w, w_end; boost::tie (w, w_end) = inv_adjacent_vertices (v, g_);
The problem is that inv_adjacency_iterator is not part of boost::graph_traits :-(
Could you tell me how can I use the inv_adjacent_vertices method (i.e., how can I declare an inv_adjacent_iterator)?
Obviously, I found a workaround 2 minutes after sending this email... which consist in using the inv_adjacency_iterator_generator: typedef typename boost::inv_adjacency_iterator_generator
::type inv_adjacency_iterator; Hope this will help someone else. Anyway, I would like to know why this type can't be also part of boost::graph_traits?
It looks like (according to http://www.boost.org/doc/libs/1_50_0/libs/graph/doc/adjacency_list.html) you should be using <your graph type>::inv_adjacency_iterator. It is probably not in graph_traits because there is no concept that uses it. -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Johan Oudinet