I have an existing graph, built from my own vertex and edge classes, as follows:
struct Graph;
struct OutPort {};
struct InPort {
OutPort* connectedOutput;
};
struct Node {
Graph* graph;
std::list<InPort> inputs;
std::list<OutPort> outputs;
};
struct Graph {
std::list<Node> nodes;
}
That is, the graph is composed of nodes, which have 0..* input and output ports. An input port be connected to to 0..1 output ports of any node (including its own).
I would like to apply the BGL algorithms to this graph, but cannot figure out how to do it while using either keeping my existing data structures above, or provide a suitable mapping between them and the BGL data structures.
I would be grateful for an introductory example.