Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2004-03-09 13:20:03


I'm sorry, but could I ask you to post a complete C++ program so that I
can
immediately reproduce the problem.

Thanks,
Jeremy

On Mar 9, 2004, at 5:33 AM, Peter Aronsson wrote:

> Hi,
>
> I have a problem with traversing over all parents of a vertex.
> If I use (the undocumented?) inv_adjacency_iterator_generator class to
> return iterators for the parents (predecessors) of a vertex I get a
> compile error. It worked on an earlier version of the library (in
> debian testing), but does not work for the latest version(1.31.0).
> I think the problem is that it can no longer find a suitable
> constructor.
>
> Here is my code:
>
> // some typedefs removed......
> typedef boost::graph_traits<TaskGraph>::in_edge_iterator
> InEdgeIterator;
> typedef boost::adjacency_list<boost::listS, boost::listS,
> boost::bidirectionalS,
> VertexProperty, EdgeProperty> TaskGraph;
> typedef boost::inv_adjacency_iterator_generator<TaskGraph, VertexID,
> InEdgeIterator>::type ParentsIterator;
>
>
> std::pair<ParentsIterator, ParentsIterator>
> parents(VertexID v, TaskGraph &tg)
> {
> InEdgeIterator e,e_end;
> tie(e,e_end) = in_edges(v,tg);
> ParentsIterator c(e),c_end(e_end); // problem here. No suitable
> constructor.
> return make_pair(e,e_end);
> }
>
>
> (Traversing through the children/predecessors works fine.)
>
> Regards Peter Aronsson
>
> --
> _________________________________________________________________
> / Peter Aronsson, Phd Student at PELAB (Programming Environments \ |
> Laboratory ) Department for Computer & Information Science | |
> Linköping University, Sweden |
> |=================================================================|
> | petar_at_[hidden] , phone +46 (0)13-28 1737 Room 3B:490 |
> \_________________________________________________________________/
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
_______________________________________________
Jeremy Siek <jsiek_at_[hidden]>
http://www.osl.iu.edu/~jsiek
Ph.D. Student, Indiana University Bloomington
C++ Booster (http://www.boost.org)
Office phone: (812) 856-1820
_______________________________________________


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