
On Jul 12, 2004, at 3:36 AM, Daniele Carlucci wrote:
Hi all, I'm a newby in this library. I'm interested to make a graph of network. It's possible or is very hard to make? I want to have inside every node a struct.
Anything is possible with the BGL :) This particular thing is too hard
to do at the moment, but will become much easier as soon as we release
1.32.0 (in about 2 weeks):
First step is to create a property tag for your struct:
enum vertex_mystruct_t { vertex_mystruct };
Now make that tag a full-fledged graph property tag:
namespace boost {
BOOST_INSTALL_PROPERTY(vertex, mystruct);
}
Now when you create your graph type, you can store a value of any type
X along with each vertex like this (the first three parameters can be
anything, of course):
struct X { int foo; };
typedef adjacency_list