I'm going to write a framework for implementation of algorithms on graphs. Of course I have to write my own Graph class, but at first I want to see what good implementations of this kind of class are there exist. I only know about boost::graph
. What other open source C++ libraies could you suggest to look at?
Asked
Active
Viewed 789 times
1

Mihran Hovsepyan
- 10,810
- 14
- 61
- 111
-
1Why? Why re-invent the wheel? – johannes Dec 25 '10 at 15:17
-
Because there is no such kind of class which definetely satisfies my requirements. – Mihran Hovsepyan Dec 25 '10 at 15:22
-
3@Mihran: but the nice thing about Boost.Graph is that you can *customize* it to fit your requirements. And this works for pretty much *all* requirements. Boost.Graph is *incredibly* powerful and flexible. – Konrad Rudolph Dec 25 '10 at 15:28
-
related: http://stackoverflow.com/questions/3039617/how-to-fit-a-custom-graph-to-the-boost-graph-library-template – Alexandre C. Dec 25 '10 at 15:32
-
I know all this feautures, but for my framework I need something more than simple graphs, and boost doesn't allows things I want :) – Mihran Hovsepyan Dec 25 '10 at 15:45
-
1So what actually do you want to do what is not posible with Boost.Graph? – InsertNickHere Dec 25 '10 at 16:05
1 Answers
3
Stick with boost:graph
. It's a mature and high quality library, so I see no reasons why you should look further than that.
And using it + studying its source will help you more than if you fumble about trying to make your own graph class without taking a look at proven libraries.

darioo
- 46,442
- 10
- 75
- 103
-
Thanks. But I think it will be good to look at some other implementations. – Mihran Hovsepyan Dec 25 '10 at 15:26
-
1`boost::graph` is excellent. You can even use it on graph structures you did not anticipate. I managed to use it to solve dynamic programming problems on arrays. You have to write iterator/traits classes which describe the graph structure, and use the `boost::graph` algorithms. They also provide a swiss-army-knife graph class suitable for most purposes, and also wrappers to legacy Fortran graph libraries. – Alexandre C. Dec 25 '10 at 15:31