20#ifndef PALUDIS_GUARD_PALUDIS_UTIL_GRAPH_HH
21#define PALUDIS_GUARD_PALUDIS_UTIL_GRAPH_HH 1
55 GraphError(
const std::string & msg)
noexcept;
74 template <
typename Node_>
75 NoSuchGraphNodeError(
const Node_ & node) noexcept :
76 GraphError(
"Node '" +
stringify(node) +
"' does not exist")
80 template <
typename Node_>
81 NoSuchGraphNodeError(
const std::shared_ptr<Node_> & node) noexcept :
82 GraphError(
"Node '" +
stringify(*node) +
"' does not exist")
103 template <
typename Node_>
104 NoSuchGraphEdgeError(
const Node_ & e1,
const Node_ & e2) noexcept :
123 class RemainingNodes;
126 std::shared_ptr<const RemainingNodes> _remaining_nodes;
132 NoGraphTopologicalOrderExistsError(
const std::shared_ptr<const RemainingNodes> &)
noexcept;
133 ~NoGraphTopologicalOrderExistsError()
override =
default;
149 template <
typename Node_,
typename Edge_,
typename Comparator_>
155 void operator= (
const DirectedGraph &);
162 DirectedGraph(
const DirectedGraph &);
190 class NodeConstIterator;
191 NodeConstIterator begin_nodes()
const;
192 NodeConstIterator end_nodes()
const;
204 void add_edge(
const Node_ &,
const Node_ &,
const Edge_ &);
250 template <
typename OutputIterator_>
bool has_node(const Node_ &) const
void delete_outgoing_edges(const Node_ &)
void delete_node(const Node_ &)
const Edge_ fetch_edge(const Node_ &, const Node_ &) const
bool has_edge(const Node_ &, const Node_ &) const
bool has_outgoing_edges(const Node_ &) const
void topological_sort(OutputIterator_ i) const
void add_node(const Node_ &)
void delete_incoming_edges(const Node_ &)
void delete_edge(const Node_ &, const Node_ &)
void add_edge(const Node_ &, const Node_ &, const Edge_ &)
std::shared_ptr< const RemainingNodes > remaining_nodes() const
std::string stringify(const T_ &item)
Definition stringify.hh:166
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24