Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL new graph type implementation trouble
From: Andrew Sutton (andrew.n.sutton_at_[hidden])
Date: 2009-09-01 11:27:47


> I am currently trying to implement a new graph type which I want to use
> with the BGL. The graph implements the Incidence Graph concept and should
> work out of the box with DFS algorithm of the BGL. However, I had to find
> out that the edge_descriptor must obey an EqualityComparison concept which
> keeps DFS from compiling. My current edge_descriptor is just a typedef to
> std::pair<vertex_descriptor, vertex_descriptor>. The vertex_descriptor
> itself is a custom object I wrote myself.
>

This is actually documented in the quickbook version of the documents...
which are incomplete and not distributed :)

I am actually working on them today... A rare case of free time before I
have to teach a class.

> Another problem turns out to appear with the copy-graph algorithm. This
> algorithm tries to copy vertex_all-property maps and edge_all property maps
> which I simply do not have defined in my custom graph as I only support the
> vertex_index mechanism. So what to do here? How can I tell copy-graph that
> these maps are not existent?
>
> Any help would be great here as I have the impression to hit limits of the
> documentation (the Equality-thing is not mentioned in the docs, at least I
> did not find it...).
>

I'm not particularly familiar with the inner workings of the algorithm. Do
you actually need the algorithm? Most graph data structures are
CopyConstructible and Assignable (Semiregular, I think). If your graphs are
of the same type, you could probably use those features.

Andrew Sutton
andrew.n.sutton_at_[hidden]



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