Boost logo

Boost Users :

Subject: Re: [Boost-users] Accessing the edge through edge descriptor with bundled properties
From: Christoph (c_p_at_[hidden])
Date: 2011-10-25 06:22:26


this is an interesting example for me as a beginner. As far as i
understand the concept of a "descriptor" it does not matter if you use
descriptors for some edges or copies of these descriptors in a container
like "border_edge".
Am i right? That is why we call it descriptor. It describes the edge but
it is not the edge, like a pointer points to an object but is not the
object. So it doesn't matter if we use descriptor A, B or C if they all
describe the same edge.

Are there any situations in which i have to care about the copies? For
instance what if I delete the edge of descriptor A (while B and C being
descriptors of the same edge). Will the descriptors B and C become
invalid in the way that they both will point to some kind of "Null"-edge
or do I have to deal with some kind of undefined behaviour?

best regards

On Mon, 2011-10-24 at 17:11 -0400, Jeremiah Willcock wrote:
> On Mon, 24 Oct 2011, giridhar wrote:
> > Hello All,
> > I have to access an edge in a vector called border_edge through an edge descriptor. For example
> >
> > for( vector<Edge>::iterator j=border_edge.begin();j!=border_edge.end();++j)
> > {
> > Edge e = t1[*j]; // I am getting error saying that No suitable conversion for Edge to Edgep exits
> > }
> Assuming your graph is named t1, it looks like you are getting your edge
> property, but trying to put into a variable whose type is your edge
> descriptor. The edge descriptor is just *j.
> -- Jeremiah Willcock
> _______________________________________________ Boost-users mailing list Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at