Boost logo

Boost :

From: Lie-Quan Lee (llee_at_[hidden])
Date: 2002-01-09 17:02:34


Hi Dave,

In fact, your code inheritance.cpp is very very close to make it
compile. :-)

I attached the updated inheritance.cpp where I add/change few things.
1) color property_map. You have your own graph and color property for
vertices in the graph. You have to provide your own color property_map.
2) change function call breadth_first_visit to pass in color map.
3) a few minor fixes like add default constructor and add const for
function operator()().

You can view the change by search //llee.

On Wed, 2002-01-09 at 12:16, David Abrahams wrote:
> Oops, I forgot my own rule about sending attachments to the list. Here is
> the missing text:
>
> ------
>
> Please find enclosed a file I'm trying to compile with the current boost CVS
> snapshot. I'm running into lots of issues. I have detailed them in comments
> in the code, but will summarize here:
>
> 1. As I mentioned in a previous posting, I have to use my own graph type
> because adjacency_list doesn't support std::set<> as a backbone.

We did not have a gragh with set<> as backbone because we did not find a
usage (or have a demand from users) yet. We could add that
into adjacency_list graph.
 
> 2. The IncidenceGraph requirements demand support for a source(e) function
> which returns the source vertex of any edge. I think this is unneeded for
> most algorithms and it causes either inefficient graph storage or
> inefficient iterators.
 
> 3. Something in the graph library is causing it to complain unless I've
> defined the following types, which are not supposed to be required for any
> of the Graph concepts I'm modelling. I hacked them in as void:
>
> typedef void in_edge_iterator;
> typedef void edge_iterator;
> typedef void edges_size_type;

With traversal_category it should be easy to us to remove that extra
hassle.
 
> 4. Making an IncidenceGraph into an AdjacencyGraph requires some boilerplate
> (admittedly using adjacency_iterator<>, but boilerplate still). This should
> be a graph adaptor in the library.
>
> 5. It isn't clear from the documentation what I need to to in order to get
> my breadth_first_visit() call to compile. I think I've followed all the
> directions, but I appear to be a long way off.
 
I think that the part confuses people is breath_first_visit with default
color_map or with explicit color_map requires different graphs. That is
true for most of BGL algorithms. I will talk with Jeremy about that.

Thank you for your questions and suggestions!
 

-- 
Lie-Quan Lee (AKA: Rich Lee)
Research Associate                   
Open Systems Laboratory        Phone:    1-812-855-3608
Computer Science Department    Email:    llee_at_[hidden]
Indiana University             Homepage: http://www.osl.iu.edu/~llee



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk