[Home]Suggestions - Graph Library

BOOST WIKI | RecentChanges | Preferences | Page List | Links List

This page is for suggestions for improvements to the Boost Graph Library.

Back to graph library pages


In order to declare your own property tag, you do the following (from the docs):

> enum edge_myflow_t { edge_myflow };
> enum edge_mycapacity_t { edge_mycapacity };
> namespace boost {
>   BOOST_INSTALL_PROPERTY(edge, myflow);
>   BOOST_INSTALL_PROPERTY(edge, mycapacity);
> }

Why not encapsulate all this in a single macro, e.g.:

    BOOST_CUSTOM_PROPERTY(edge, myflow);

The macro would do:

    enum edge_myflow_t { edge_myflow };
    namespace boost {
        BOOST_INSTALL_PROPERTY(edge, myflow);

    - People/Chuck Messenger

Always put graph argument first

Some functions take the graph as the first argument (e.g. topological_sort), while others take it as the last argument (e.g. add_edge). Consistency would be nice. Personally, I think having graph as the first argument is the most natural.

    - People/Chuck Messenger

I'm +1 on this. The different positions of graph argument for add_edge and getting internal property, for example, always confused me

    -- People/Vladimir Prus


It would be very convenient if you could do

    #include <boost/graph.hpp>

to include all of the graph library headers. As it is, figuring out which headers are needed is quite laborious. Currently, at least the Lambda library has something like this (although it's in boost/lambda/lambda.hpp -- it would be better placed in boost/lambda.hpp).

    - People/Chuck Messenger

Put graph symbols in boost::graph

It would be preferable if the graph library symbols were not in the top-level boost namespace. It seems like the earlier Boost libraries did this, while later ones, like lambda, put their symbols in their own namespace -- e.g. boost::lambda. The way it is, there are simply too many symbols in boost's toplevel.

    - People/Chuck Messenger

BOOST WIKI | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited May 17, 2003 5:59 am (diff)
Disclaimer: This site not officially maintained by Boost Developers