$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Jens Müller (jens.mueller_at_[hidden])
Date: 2007-02-24 09:31:14
Can I store an edge_descriptor of a predecessor edge as an
internal/bundled property?
I am currently doing this:
struct EdgeProperties;
struct VertexProperties
{
double x;
double y;
double weight;
int dist;
boost::graph_traits<
boost::adjacency_list<boost::vecS, boost::vecS,
boost::bidirectionalS, VertexProperties, EdgeProperties>
>::edge_descriptor pred;
int app_height;
bool mark;
};
struct EdgeProperties
{
double length;
};
int main() {
using namespace boost;
typedef adjacency_list<vecS, vecS, bidirectionalS, VertexProperties,
EdgeProperties> Graph;
}
This is legal, isn't need? Obviously the definition of EdgeProperties is
not needed where it is first used.
But is this the proper way to do it, or is there a more elegant way?