A data structure that ties together multiple directed acyclic graphs.
If a VuoDirectedAcyclicGraph::Vertex with the same key appears in two graphs, and there is an edge from the first graph to the second graph, then this data structure effectively adds an edge from the vertex in the first graph to the vertex in the second graph: vertices downstream of the vertex in the second graph are also downstream of the vertex in the first graph.
Definition at line 71 of file VuoDirectedAcyclicGraph.hh.
Public Member Functions | |
vector< VuoDirectedAcyclicGraph::Vertex * > | findVertex (const string &key) |
Returns all vertices in the network whose VuoDirectedAcyclicGraph::Vertex::key function returns key. | |
void | addEdge (VuoDirectedAcyclicGraph *fromGraph, VuoDirectedAcyclicGraph *toGraph) |
Adds a directed edge to the network. | |
vector< VuoDirectedAcyclicGraph::Vertex * > | getImmediatelyDownstreamVertices (VuoDirectedAcyclicGraph::Vertex *vertex) |
Returns all vertices that are directly connected to vertex by a directed edge from vertex to the other vertex within any graph in the network. | |
vector< VuoDirectedAcyclicGraph::Vertex * > | getDownstreamVertices (VuoDirectedAcyclicGraph::Vertex *vertex) |
Returns all vertices that can be reached from vertex via a path of directed vertex-to-vertex edges within graphs and directed graph-to-graph edges within the network. | |
vector< VuoDirectedAcyclicGraph::Vertex * > | getImmediatelyUpstreamVertices (VuoDirectedAcyclicGraph::Vertex *vertex) |
Returns all vertices that are directly connected to vertex by a directed edge from the other vertex to vertex within any graph in the network. | |
vector< VuoDirectedAcyclicGraph::Vertex * > | getUpstreamVertices (VuoDirectedAcyclicGraph::Vertex *vertex) |
Returns all vertices that can reach vertex via a path of directed vertex-to-vertex edges with graphs and directed graph-to-graph edges within the network. | |
string | toString (bool showVertexAddresses=false) |
For debugging. | |
void VuoDirectedAcyclicNetwork::addEdge | ( | VuoDirectedAcyclicGraph * | fromGraph, |
VuoDirectedAcyclicGraph * | toGraph | ||
) |
Adds a directed edge to the network.
The network does not take ownership of the graph objects.
If this function is called multiple times for the same edge endpoints, the edge is only added once.
Definition at line 394 of file VuoDirectedAcyclicGraph.cc.
vector< VuoDirectedAcyclicGraph::Vertex * > VuoDirectedAcyclicNetwork::findVertex | ( | const string & | key | ) |
Returns all vertices in the network whose VuoDirectedAcyclicGraph::Vertex::key function returns key.
Definition at line 375 of file VuoDirectedAcyclicGraph.cc.
vector< VuoDirectedAcyclicGraph::Vertex * > VuoDirectedAcyclicNetwork::getDownstreamVertices | ( | VuoDirectedAcyclicGraph::Vertex * | vertex | ) |
Returns all vertices that can be reached from vertex via a path of directed vertex-to-vertex edges within graphs and directed graph-to-graph edges within the network.
When different vertex instances with the same key appear in multiple graphs along the paths, all instances are returned.
The returned vertices are not in any particular order. In the future, this function may be modified to return them in topological order.
Definition at line 425 of file VuoDirectedAcyclicGraph.cc.
vector< VuoDirectedAcyclicGraph::Vertex * > VuoDirectedAcyclicNetwork::getImmediatelyDownstreamVertices | ( | VuoDirectedAcyclicGraph::Vertex * | vertex | ) |
Returns all vertices that are directly connected to vertex by a directed edge from vertex to the other vertex within any graph in the network.
When different vertex instances with the same key as vertex appear in multiple graphs, all downstream instances are returned.
Definition at line 410 of file VuoDirectedAcyclicGraph.cc.
vector< VuoDirectedAcyclicGraph::Vertex * > VuoDirectedAcyclicNetwork::getImmediatelyUpstreamVertices | ( | VuoDirectedAcyclicGraph::Vertex * | vertex | ) |
Returns all vertices that are directly connected to vertex by a directed edge from the other vertex to vertex within any graph in the network.
When different vertex instances with the same key as vertex appear in multiple graphs, all upstream instances are returned.
Definition at line 437 of file VuoDirectedAcyclicGraph.cc.
vector< VuoDirectedAcyclicGraph::Vertex * > VuoDirectedAcyclicNetwork::getUpstreamVertices | ( | VuoDirectedAcyclicGraph::Vertex * | vertex | ) |
Returns all vertices that can reach vertex via a path of directed vertex-to-vertex edges with graphs and directed graph-to-graph edges within the network.
When different vertex instances with the same key appear in multiple graphs along the paths, all instances are returned.
The returned vertices are not in any particular order. In the future, this function may be modified to return them in topological order.
Definition at line 452 of file VuoDirectedAcyclicGraph.cc.
string VuoDirectedAcyclicNetwork::toString | ( | bool | showVertexAddresses = false | ) |
For debugging.
Definition at line 574 of file VuoDirectedAcyclicGraph.cc.