ardour
|
#include <route_graph.h>
Public Types | |
typedef std::map< GraphVertex, std::set< GraphVertex > > | EdgeMap |
Public Member Functions | |
void | add (GraphVertex from, GraphVertex to, bool via_sends_only) |
bool | has (GraphVertex from, GraphVertex to, bool *via_sends_only) |
std::set< GraphVertex > | from (GraphVertex r) const |
void | remove (GraphVertex from, GraphVertex to) |
bool | has_none_to (GraphVertex to) const |
bool | empty () const |
void | dump () const |
Private Types | |
typedef std::multimap < GraphVertex, std::pair < GraphVertex, bool > > | EdgeMapWithSends |
Private Member Functions | |
void | insert (EdgeMap &e, GraphVertex a, GraphVertex b) |
EdgeMapWithSends::iterator | find_in_from_to_with_sends (GraphVertex, GraphVertex) |
Private Attributes | |
EdgeMap | _from_to |
EdgeMap | _to_from |
EdgeMapWithSends | _from_to_with_sends |
A list of edges for a directed graph for routes.
It keeps the same data in a few different ways, with add() adding edges to all different representations, remove() removing similarly, and the lookup method using whichever representation is most efficient for that particular lookup.
This may be a premature optimisation...
Definition at line 40 of file route_graph.h.
typedef std::map<GraphVertex, std::set<GraphVertex> > ARDOUR::GraphEdges::EdgeMap |
Definition at line 43 of file route_graph.h.
|
private |
Definition at line 56 of file route_graph.h.
void GraphEdges::add | ( | GraphVertex | from, |
GraphVertex | to, | ||
bool | via_sends_only | ||
) |
Definition at line 30 of file route_graph.cc.
void GraphEdges::dump | ( | ) | const |
Definition at line 133 of file route_graph.cc.
bool GraphEdges::empty | ( | ) | const |
Definition at line 126 of file route_graph.cc.
|
private |
Find a from/to pair in the _from_to_with_sends map.
Definition at line 49 of file route_graph.cc.
set< GraphVertex > GraphEdges::from | ( | GraphVertex | r | ) | const |
Definition at line 83 of file route_graph.cc.
bool GraphEdges::has | ( | GraphVertex | from, |
GraphVertex | to, | ||
bool * | via_sends_only | ||
) |
via_sends_only | if non-0, filled in with true if the edge is a path via a send only. |
Definition at line 67 of file route_graph.cc.
bool GraphEdges::has_none_to | ( | GraphVertex | to | ) | const |
to | `To' route. |
Definition at line 120 of file route_graph.cc.
|
private |
Insert an edge into one of the EdgeMaps
Definition at line 154 of file route_graph.cc.
void GraphEdges::remove | ( | GraphVertex | from, |
GraphVertex | to | ||
) |
Definition at line 94 of file route_graph.cc.
|
private |
map of edges with from as `first' and to as `second'
Definition at line 61 of file route_graph.h.
|
private |
map of edges with via-sends information; first part of the map is the `from' vertex, second is the `to' vertex and a flag which is true if the edge is via a send only.
Definition at line 68 of file route_graph.h.
|
private |
map of the same edges with to as `first' and from as `second'
Definition at line 63 of file route_graph.h.