Sign in to follow this  

road map alike data structure

This topic is 2787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear all, does anyone know of a library that implements a data structure similar to road maps? I would need to keep track of several points (crossroads), and an undefined number of connections between them. Note that the connections have properties of their own, so they can't just be pointers to other points. I have a design ready, but it has a butload of lists of pointers going back and forth from "points" to "connections" and back and I'm afraid I'll get into trouble with dangling pointers in the destructors. for example: deleting a point means deleting all connections to this point, this means that all points connected to the deleted one need to have their connection updated to avoid them having pointers to deleted connections. and that's just deleting one point, imagine what would happen if someone were to delete a mixt series of points and connections... It's a nuclear disaster waiting to happen. Greetings, TH PS I'm using C++

Share this post


Link to post
Share on other sites
What bad things did you read about boost::graph? -- The only problem I've ever had with the boost graph library is that a million years ago Visual Studio used to choke on it, but that was a million years ago. As for documentation, well, I mean... what more can you ask for

I've never used LEMON but I've used other COIN-OR projects without problems.

Share this post


Link to post
Share on other sites

By nasty things i mean this. Granted, the posts are 4 years old.

And as for documentation, since this is just a hobby of mine, i'm not going to spend 40 dollars for a tutorial on each library i want to use. There is online documentation, but one has to admit it is not very clear...

Share this post


Link to post
Share on other sites
Quote:
Original post by twoaterisn
By nasty things i mean this. Granted, the posts are 4 years old.

The people in that thread sound like they are talking about boost::spirit -- anyway if they were talking about Spirit I'd be more sympathetic.

The boost graph library really isn't that bad and is in fact not a crazy example of bleeding edge template metaprogramming for the sake of template metaprogramming in my opinion. It's a template libary, yes, but the way in which it uses templates is pretty standard nowadays. I mean, LEMON looks like it is a template library too, ... but, you know, your mileage may vary. My advice would be to pick one and try it; just don't try to use BGL with an old or non-conforming compiler.

Quote:
Original post by twoaterisn
And as for documentation, since this is just a hobby of mine, i'm not going to spend 40 dollars for a tutorial on each library i want to use. There is online documentation, but one has to admit it is not very clear...


The online documentation could be better but that's true of every 3rd party library you will ever use in your life. I don't own the book so I can't vouch for it but you might try these places they used to have called public libraries :)

---
You know, the other thing is you haven't told us what you want to do with graphs. The main reason, in my opinion, to use one of these libraries is that BGL at least provides an implementation for pretty much any graph algorithm that you can name and some of them aren't the easiest things in the world to reproduce yourself. However, if all you need is a DFS or BFS or something you could just skip the libararies and use your own data structure.

[Edited by - jwezorek on April 28, 2010 2:26:39 PM]

Share this post


Link to post
Share on other sites

This topic is 2787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this