Well, my code looks like
typedef boost::adjacency_list<
boost::listS, boost::vecS, boost::undirectedS,
RegionProperties, EdgeProperties> Graph;
template <typename Graph>
struct edge_off
{
edge_off(): G(NULL) { }
edge_off(const Graph &G) : m_G(&G) { }
template <typename Edge>
bool operator()(const Edge& e) const
{
return !(*G)[e].on;
}
const Graph *G;
};
....
Graph G;
....
filtered_graph
I've been trying to use the Boost Graph Library. For the most part I'm working it out. However, I'm finding the documentation annoyingly decentralized....it isn't interlinked enough, at the very least. Too hard to go from "how do I use X" to "oh, here's the documentation on X." Took me half an hour just to find *something* on the add_edge function (turns out it's on the Concepts page?), and what's there *barely* qualifies as a prototype, much less a proper man page.
Concepts are similar "STL Concepts" ( http://www.sgi.com/tech/stl/table_of_contents.html). They classify and describe the operations available to /all/ graph data structures (e.g., adjacency_list or matrix), which is why it might seem to barely qualify as a prototype.
My current question is regarding properties. Some of the algorithms specify the "edge_weight" property as if it's something all edges have, and the vertex_index property as if it's something all vecS-specified graphs have. Yet I can't find any documentation explicitly confirming this, and my compiler seems to disagree in any case.
http://www.boost.org/doc/libs/1_38_0/libs/graph/doc/kruskal_min_spanning_tre...
No edges are weighted by default. The easiest way to weight a graph is to
used bundled properties (
http://www.boost.org/doc/libs/1_38_0/libs/graph/doc/bundles.html) and create
a property_map over a member pointer.
Currently, only adjacency_list
comprehensive list of default properties available somewhere (together with how those are replaced or supplemented when user properties are introduced)?
I'm currently rewriting the documentation, but that won't be ready until 1.40 at the earliest. Andrew Sutton andrew.n.sutton@gmail.com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users