|
Boost Users : |
Subject: Re: [Boost-users] [graph] Graph type needed in graph proptery, cyclic definition problem, minimal example
From: Christoph (c_p_at_[hidden])
Date: 2011-10-26 11:18:43
Hi,
here is a minimal version. The code compiles however in the
graph_properties struct i would like to define a traits graph type
as it is possible for vertex_descriptors.
// begin code
#include <iostream>
#include <map>
#include <boost/graph/adjacency_list.hpp>
typedef boost::adjacency_list_traits<boost::listS, boost::vecS,
boost::bidirectionalS>
link_adjacency_list_traits;
struct vertex_properties {
std::map <int, link_adjacency_list_traits::edge_descriptor >
used_colors;
// this one works fine, i can use a traits::edge_descriptor
};
struct graph_properties {
int delta;
// link_adjacency_list_traits::??? g;
// i need a 'traits_graph', too
// link_graph g; is not possible because its definition needs
// the definition of graph_properties
// how to declare it?
// but out_degree (u, g) does not need to know any properties
};
struct edge_properties {
int color;
};
typedef boost::adjacency_list < boost::listS,
boost::listS,
boost::bidirectionalS,
vertex_properties,
edge_properties,
graph_properties>
link_graph;
int main ()
{
link_graph g;
}
// end code
best regards
christoph
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