REVIEW - The Boost Graph Library - User guide and reference manual


The Boost Graph Library

User guide and reference manual


Jeremy Siek, Lie-Quan Lee, Andrew Lumsdaine



Addison-Wesley Professional (2002)




Francis Glassborow


February 2002



If you are a serious general-purpose programmer using C++ I think this is one of those books that should be on your reading list.

Let me deal with the three key words in the title of this book. First of all if you do not already know about Boost and you have pretensions to being a C++ programmer you should rectify this fault immediately by taking yourself to the nearest computer with access to the Internet. When you are there visit
. There you will find an extraordinary repository of material written by some of the most skilled library designers/implementers in the World. Those that are already familiar with the site and the group that it fronts for will, I hope, agree. Much of the material you will find there is destined to be incorporated into the next or the next but one version of the Standard C++ Library.

OK, so by now we all know what Boost is. But what about the final word, 'Library'? I hope that we all agree that, in this context, it must refer to a collection of source code that is provided in a reusable form. These days that will often mean that much of the material is in generic form and provided as templates (in the past a library was almost always shipped as headers + object code).

Now the middle word has to be read carefully. Please note that there is no 'ics'. This is not a library to provide the tools for producing pretty pictures. You will not find source code to do flood fills, or colour merging. This is a book that provides the source code tools to support work with what mathematicians call 'Graph Theory'. And again that is not what all expect. I am not talking about the kind of graphs that many find themselves doing for their maths' homework but the kind of thing that consists of nodes (vertices) and arcs (paths) joining them. If this is new to you, try meandering down to your local library or even your nearest bookshop (store for those on the other side of the Atlantic) and doing some basic self education. It is a fascinating subject with a rich variety of problems ranging from trivial to as yet unsolved ones.

So this book is about a collection of generic source code to support those working with algorithms that form the basic tools for those using Graph Theory in their work. The quality of the source code almost goes without saying, but what about the quality of the book? You can get the source code for nothing, so is it worth spending real money to get some documentation? Is the added value worth going without a few pints?

Let me do things backwards. The second part of the book is just a reference manual. You should already be well familiar with these. For example the style of presentation is similar to that used by Matt Austern in his book 'Generic Programming and the STL'. The real value of the book must lie in the first part, the so called 'User Guide.' The first interesting point to note is a stylistic one. The authors use a presentational style derived form Knuth's 'Literate Programming'. I do not think they have stuck with the purity that would truly justify saying that this book uses LP but there is certainly a strong influence (and I think a beneficial one).

The upshot is that we have a readable introduction to both the BGL as such and to what it is for. However let me warn you that this is not a book for the lazy minded who expect everything to be crystal clear at first reading. Unless you are already fluent in both generic programming and Graph Theory, you are going to have to work hard to achieve understanding and mastery. However this is the book that will give you a fighting chance of doing just that. I think this is a book that will reward you for studying it and your largest investment is going to be your own time. If you already understand how to use Graphs in your work, the reference section will be useful, but for the majority it will be the 'User Manual' that they should be spending time on.

If you are a serious general-purpose programmer using C++ I think this is one of those books that should be on your reading list.

Book cover image courtesy of Open Library.

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.