question on property tags and bundled properties.

Hi,
I am attempting use bundled properties for my graph processing.
My attempt to 'write_graphviz' fails because of a lack of an
vertex_index as an internal property.
But how does one specify this? Named params do not seem to be
an option. Being new to the template meta programming game,
I am having some trouble figuring out how to make this work.
Code snippet below is the simplest that would reproduce my problem.
Thanks in advance for any clues/hints on how to proceed.
-sr
#include

On Jul 13, 2005, at 9:01 AM, sr kumar wrote:
I am attempting use bundled properties for my graph processing. My attempt to 'write_graphviz' fails because of a lack of an vertex_index as an internal property.
But how does one specify this? Named params do not seem to be an option. Being new to the template meta programming game, I am having some trouble figuring out how to make this work.
We've fixed write_graphviz so that it takes an (optional) index_map. This change will be in the upcoming Boost 1.33.0.
#include
#include #include using namespace boost; using namespace std;
class A { public: // dummy class };
typedef struct VertexProperties { A* a; std::size_t index; boost::default_color_type color; } VertexProperties;
typedef struct EdgeProperties { A* a; } EdgeProperties;
int main(void) {
typedef adjacency_list
Graph;
If you need a quick fix (other than getting Boost from CVS), you can
actually mix bundled properties with non-bundled properties. For
instance, if you remove the "index" member from VertexProperties you
can then do this:
typedef adjacency_list
participants (2)
-
Doug Gregor
-
sr kumar