|
Boost Users : |
From: pixelpusher_at_[hidden]
Date: 2006-06-22 11:08:18
Sorry for the newbieishness of the question, but I'm just getting started with C++ templates in general and Boost.Graph in particular. It seems to me that, while there is plenty of it, the documentation assumes a level of understanding of templates and other OO principles that I simply don't have at this point. Normally, I'd start digging into the example programs and look for common points of reference with things I already know and use the comments in the code for guidance. However, the example programs for BGL are astonishingly devoid of comments. They seem to be written for folks who already know how BGL works, not for folks who are trying to learn it. Most of what I see in the examples leaves me scratching my head and wondering WTF am I getting myself into here.
Anyway, what I was hoping to find was more of a tutorial in how to get started writing a path-finding program using BGL and (probably) the Dijkstra-shortest paths template.
- I have a set of edges that I will read from a text file. I don't know in advance how many edges will be read, so I plan to use an std::vector to store each edge's id, nodes, and weight. (All of the examples construct an array of known size and use that to build the graph. None use variable sized structures to build the graph.) Unless, of course, I can load the graph without pre-constructing a storage scheme.
- The edge weights have to be modified based on the user's preferences, which will change with every run. (None of the examples show how to change edge weights.)
- I will have known starting and ending nodes. I don't need to know the paths from my source to every possible destination. I only need to extract the best one that leads to my destination.
I'd be happy enough for now just to know how to get started on the first bullet. Can anyone provide any guidance here? I'd really appreciate it.
Thanks,
Thom
-- ------------------------------------------------------- Man will occasionally stumble over the truth, but most of the time he will pick himself up and continue. -- Winston Churchill
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net