Boost logo

Boost Users :

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?


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