Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Graph of an Iterator
From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2010-05-20 14:36:39


Jeremiah,

> > graph_type gg = graph_of(begin);
> >
> > so that gg == g?
>
> That's not really possible, just like there is no mapping from STL
> iterators to their corresponding paper.  In some cases

The situation is not exactly as with STL. In STL, for an iterator i, *i will give the element i refers to. (Forgive my technically imprecise terminology for a moment please.) Whereas, in BGL, for a vertex_iterator vi, *vi will not give the vertex vi refers to; it's g[*vi] that does that. So, in fact, my problem will be solved if I can find a way of getting holds of the vertex vi is referring to even without messing around with g. Any ideas?

TIA,
--Hossein


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