3.2.12.7. dg/VertexMapper.hpp¶
3.2.12.7.1. Class dg::VertexMapper
¶
-
class dg::VertexMapper¶
A class for enumerating all valid vertex maps for a given
dg::DG::HyperEdge
. That is, for such a hyperedge, collect the graphs associated with respectively the source and target vertices, and create the disjoint union of those graphs. Let the result be the graphs \(G\) and \(H\). Then each rule \(r\) associated with the hyperedge, calculate each direct derivation \(G \overset{r}{\Rightarrow} H\) and record the associated vertex maps \(V(G) \rightarrow V(H)\). Those maps are available in this class.
3.2.12.7.1.1. Synopsis¶
-
using Map = VertexMap<graph::Union, graph::Union>;
-
using value_type = std::pair<Map, std::shared_ptr<rule::Rule>>
-
class iterator
-
using const_iterator = iterator
-
VertexMapper(DG::HyperEdge e)
-
DG::HyperEdge getEdge() const
-
graph::Union getLeft() const
-
graph::Union getRight() const
-
const_iterator begin() const
-
const_iterator end() const
-
std::size_t size() const
-
value_type operator[](std::size_t i) const
3.2.12.7.1.2. Details¶
-
using value_type = std::pair<Map, std::shared_ptr<rule::Rule>>¶
The value type returned for each vertex map: the rule used to generate the map, and then the actual map.
-
class iterator¶
A random-access iterator over
value_type
s.
-
VertexMapper(DG::HyperEdge e)¶
Construct a vertex map holder.
- Throws
LogicError
if !e.
-
graph::Union getLeft() const¶
-
graph::Union getRight() const¶
- Returns
the disjoint union of graphs from respectively the source and target vertices of the hyperedge. That is, the graphs \(G\) and \(H\) that are the domain and codomain graphs of the calculated vertex maps.
-
const_iterator begin() const¶
-
const_iterator end() const¶
- Returns
iterators for the range of vertex maps calculated by the mapper.
-
value_type operator[](std::size_t i) const¶
- Returns
- Throws
LogicError
if i >= size().