Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2006-07-11 09:04:38


On Jul 11, 2006, at 5:42 AM, Heiko Bauke wrote:

> Hello,
>
> how can I deal with bipartite graphs and BGL? In particular I have the
> problem that my graph has two kinds of nodes with different kinds of
> vertex properties. Any suggestions?

You could use store a property of type boost::variant<node1_data,
node2_data> on each node. The variant will tell you which kind of
node it is, and store node1_data/node2_data will store the properties
appropriate for the different kinds of nodes.

        Doug


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