12template<
class DecoratorImpl,
class G, Edge E =
typename G::edge_type>
17 using N = G::node_type;
28 return g.addNode(node);
32 return g.addNode(node);
35 template<
typename... Args>
37 return g.addNode(node,args...);
40 template<
typename... Args>
42 return g.addNode(std::move(node),args...);
46 return g.addNodes(nodes);
50 return g.addNodes(nodes);
54 return g.containsNode(node);
62 return g.addEdge(from,to);
66 return g.addEdge(std::move(from),std::move(to));
70 return g.addEdge(edge);
82 return g.containsEdge(from,to);
86 return g.containsEdge(edge);
90 g.removeEdge(from,to);
98 return g.makeEdge(from,to);
110 return g.getNeighbours(node);
114 return g.getReachableFrom(node);
118 return g.getOutboundEdges(node);
122 return g.getInboundEdges(node);
126 return g.getAdjacencyContainer();
Abstract Graph Decorator using CRTP.
Definition GraphDecorator.hpp:14
void addEdges(util::forward_range_of< std::pair< N, N > > auto &&edges)
Definition GraphDecorator.hpp:73
G::adj_container_type adj_container_type
Definition GraphDecorator.hpp:24
G g
Definition GraphDecorator.hpp:16
bool addNode(N &&node, Args... args)
Definition GraphDecorator.hpp:41
N node_type
Definition GraphDecorator.hpp:25
void removeNode(const N &node)
Definition GraphDecorator.hpp:57
bool addEdge(const N &from, const N &to)
Definition GraphDecorator.hpp:61
E makeEdge(const N &from, const N &to) const
Definition GraphDecorator.hpp:97
void removeEdge(const N &from, const N &to)
Definition GraphDecorator.hpp:89
bool addEdge(N &&from, N &&to)
Definition GraphDecorator.hpp:65
bool addNodes(util::forward_range_of< N > auto &&nodes)
Definition GraphDecorator.hpp:49
G::node_type N
Definition GraphDecorator.hpp:17
bool addNodes(util::forward_range_of< N > auto &nodes)
Definition GraphDecorator.hpp:45
void addEdges(util::forward_range_of< E > auto &&edges)
Definition GraphDecorator.hpp:77
void clear()
Definition GraphDecorator.hpp:129
bool containsNode(const N &node) const noexcept
Definition GraphDecorator.hpp:53
const auto & getAdjacencyContainer() const
Definition GraphDecorator.hpp:125
auto getNeighbours(const N &node) const noexcept
Definition GraphDecorator.hpp:109
bool addNode(const N &node, Args... args)
Definition GraphDecorator.hpp:36
bool addNode(N &&node)
Definition GraphDecorator.hpp:31
bool containsEdge(const E &edge) const noexcept
Definition GraphDecorator.hpp:85
auto getReachableFrom(const N &node) const noexcept
Definition GraphDecorator.hpp:113
auto getNodes() const noexcept
Definition GraphDecorator.hpp:101
GraphDecorator(util::forward_range_of< N > auto &&nodes)
Definition GraphDecorator.hpp:21
auto getOutboundEdges(const N &node) const
Definition GraphDecorator.hpp:117
auto getEdges() const
Definition GraphDecorator.hpp:105
void removeEdge(const E &edge)
Definition GraphDecorator.hpp:93
GraphDecorator(typename G::adj_container_type &&adjContainer)
Definition GraphDecorator.hpp:20
E edge_type
Definition GraphDecorator.hpp:23
virtual ~GraphDecorator()=default
bool containsEdge(const N &from, const N &to) const noexcept
Definition GraphDecorator.hpp:81
auto getInboundEdges(const N &node) const
Definition GraphDecorator.hpp:121
bool addEdge(const E &edge)
Definition GraphDecorator.hpp:69
bool addNode(N &node)
Definition GraphDecorator.hpp:27
Definition CollectionConcepts.hpp:27
Definition AdjacencyContainer.hpp:4