Bundled properties are straightforward to use:
using namespace boost;
struct vertex_info {
std::string whatever;
int othervalue;
std::vector<int> some_values;
};
typedef adjacency_list<vecS, vecS, undirectedS, vertex_info> graph_t;
graph_t g(n);
g[0].whatever = "Vertex 0";
[...]
and so on.
Please also refer to the docs.
The other type of vertex property that are very useful are external properties. You can declare std::vectors
of the appropriate size and use them as properties.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…