Graph Library Suggestions
I have an idea for an algorithm that requires a graph. Any suggestions on good library in c++ for the data structure would be nice, then I wouldn't have to reinvent the wheel. There is one special requirement; there can be (but needn't be) two edges per connected nodes. Each edge has a direction and weight. If the edge is implemented as a template class, then it can store a tuple or pair with the differing weights for each direction. I've taken a look and boost, but it seems like overkill, Below is an example of what I need.
I created the image above in Kivio. This is the first time I've had an opportunity to use it. Great work KOffice team!
EDIT: I'm going to go with boost for now. Additional suggestions are still welcome.


13 comments:
boost is not too much difficult to use when you are used to, but you could also have a look at Qanava (http://www.libqanava.org), a Qt graph library. This is designed to handle generic graphs and if you need some changes, I'm sure its author will be OK to make changes or to accept your patches.
I will probably change KGraphViewer to use Qanava instead of its own specific implementation.
I've used boost::graph a bit, and while lacking in documentation, it works pretty well.
Check out Graphviz.
Always way over my head from the start. This though is the frosting on the cake. Jacob, I asked Kerry McNaughton about you and this site is what she sent. I do not understand it, but, I'd add; you could just make something up and 95% of the world would believe it was real! I am glad to see you have found your niche and have to tell you I miss you. Oh and my network is limping along in the classroom, slowed down but still the bulletproof network you created. If you get a chance call me, I am in the book. Dinsmore
If you need only data structure, STL library is enough. One of the advantages is that you don't need to link to anything external, it is the standard library. Use vector if you don't need to delete edges, or list if you need to do so. Example:
Include section:
#include <vector>
#include <utility>
using std::vector;
using std::pair;
using std::make_pair;
Declare edge struct:
vector<pair<int,int> > edges;
Add edge:
edges.push_back( make_pair( to_node, weight ) );
Travelse all:
for( unsigned int i = 0 ; i<edges.size() ; i++ )
;
Nice one :) Thanks!
http://tribal-flower-tattoo.freehost.lt/
tribal flower tattoo
Splendid. Excellent post, realy helpful. Thank you!
True. Thanks for an advice and your post.
Out of curiosity, whatever happened to the language detection stuff in Sonnet?
Churchill GAA is a Gaelic Athletic Association club based outside Tralee in County Kerry, Ireland.They play in
Division 5 of the county league and in the Novice Championship. The club's most famous player is former Irish
Republican Army member and Kerry U-21 player Martin Ferris...
Max Sumners is not only the leader of the grey Griffins, but he is also the Guardian of the Codex. It is his responsibility to make sure the Codex is always safe.
Cooks' Cottage (also known as Captain Cook's Cottage) is located in the Fitzroy Gardens, Melbourne, Australia. The cottage was constructed in 1755 in the English village of Great Ayton, North Yorkshire, by the parents of Captain James Cook, James and Grace Cook. It is a point of conjecture among historians whether James Cook, the famous navigator, ever lived in the house, but almost certainly he visited his parents at the house.
keno game
.http://wvvv6.spaces.live.com
http://pumashoes2009.spaces.live.com
http://buy-cheap-ugg-boots.blogspot.com
http://www.eshooes.com/cheap-shoes-show
http://good-puma.blogspot.com/
.http://apps.facebook.com/faceblogged/?uid=1447786117
Post a Comment