Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::GraphEdges Class Reference

#include <graph_edges.h>

Public Member Functions

void add (GraphVertex from, GraphVertex to, bool via_sends_only)
 
void remove (GraphVertex from, GraphVertex to)
 
bool has (GraphVertex from, GraphVertex to, bool *via_sends_only)
 
bool feeds (GraphVertex from, GraphVertex to) const
 
std::set< GraphVertexfrom (GraphVertex r) const
 
std::set< GraphVertexto (GraphVertex r, bool via_sends_only=false) const
 
bool has_none_to (GraphVertex to) const
 
bool empty () const
 
void dump () const
 

Private Types

typedef std::map< GraphVertex, std::set< GraphVertex > > EdgeMap
 
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)
 
EdgeMapWithSends::iterator find_in_to_from_with_sends (GraphVertex, GraphVertex)
 
EdgeMapWithSends::const_iterator find_recursively_in_from_to_with_sends (GraphVertex, GraphVertex) const
 

Private Attributes

EdgeMap _from_to
 
EdgeMap _to_from
 
EdgeMapWithSends _from_to_with_sends
 
EdgeMapWithSends _to_from_with_sends
 

Detailed Description

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 41 of file graph_edges.h.

Member Typedef Documentation

◆ EdgeMap

typedef std::map<GraphVertex, std::set<GraphVertex> > ARDOUR::GraphEdges::EdgeMap
private

Definition at line 58 of file graph_edges.h.

◆ EdgeMapWithSends

typedef std::multimap<GraphVertex, std::pair<GraphVertex, bool> > ARDOUR::GraphEdges::EdgeMapWithSends
private

Definition at line 59 of file graph_edges.h.

Member Function Documentation

◆ add()

void ARDOUR::GraphEdges::add ( GraphVertex  from,
GraphVertex  to,
bool  via_sends_only 
)

◆ dump()

void ARDOUR::GraphEdges::dump ( ) const

◆ empty()

bool ARDOUR::GraphEdges::empty ( ) const

◆ feeds()

bool ARDOUR::GraphEdges::feeds ( GraphVertex  from,
GraphVertex  to 
) const

◆ find_in_from_to_with_sends()

EdgeMapWithSends::iterator ARDOUR::GraphEdges::find_in_from_to_with_sends ( GraphVertex  ,
GraphVertex   
)
private

◆ find_in_to_from_with_sends()

EdgeMapWithSends::iterator ARDOUR::GraphEdges::find_in_to_from_with_sends ( GraphVertex  ,
GraphVertex   
)
private

◆ find_recursively_in_from_to_with_sends()

EdgeMapWithSends::const_iterator ARDOUR::GraphEdges::find_recursively_in_from_to_with_sends ( GraphVertex  ,
GraphVertex   
) const
private

◆ from()

std::set<GraphVertex> ARDOUR::GraphEdges::from ( GraphVertex  r) const
Returns
the vertices that are directly fed from ‘r’

◆ has()

bool ARDOUR::GraphEdges::has ( GraphVertex  from,
GraphVertex  to,
bool *  via_sends_only 
)

◆ has_none_to()

bool ARDOUR::GraphEdges::has_none_to ( GraphVertex  to) const

◆ insert()

void ARDOUR::GraphEdges::insert ( EdgeMap e,
GraphVertex  a,
GraphVertex  b 
)
private

◆ remove()

void ARDOUR::GraphEdges::remove ( GraphVertex  from,
GraphVertex  to 
)

◆ to()

std::set<GraphVertex> ARDOUR::GraphEdges::to ( GraphVertex  r,
bool  via_sends_only = false 
) const
Returns
all nodes that feed ‘r’ (r is fed-by rv)

Member Data Documentation

◆ _from_to

EdgeMap ARDOUR::GraphEdges::_from_to
private

map of edges with from as ‘first’ and to as ‘second’

Definition at line 69 of file graph_edges.h.

◆ _from_to_with_sends

EdgeMapWithSends ARDOUR::GraphEdges::_from_to_with_sends
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 76 of file graph_edges.h.

◆ _to_from

EdgeMap ARDOUR::GraphEdges::_to_from
private

map of the same edges with to as ‘first’ and from as ‘second’

Definition at line 71 of file graph_edges.h.

◆ _to_from_with_sends

EdgeMapWithSends ARDOUR::GraphEdges::_to_from_with_sends
private

Definition at line 77 of file graph_edges.h.


The documentation for this class was generated from the following file: