#include <graph.hh>
Basic operations | |
DirectedGraph () | |
DirectedGraph (const DirectedGraph &) | |
~DirectedGraph () | |
Node related functions | |
void | add_node (const Node_ &) |
void | delete_node (const Node_ &) |
bool | has_node (const Node_ &) const |
Iterate over our nodes | |
NodeConstIterator | begin_nodes () const |
NodeConstIterator | end_nodes () const |
Edge related functions | |
void | add_edge (const Node_ &, const Node_ &, const Edge_ &) |
void | delete_edge (const Node_ &, const Node_ &) |
void | delete_outgoing_edges (const Node_ &) |
void | delete_incoming_edges (const Node_ &) |
bool | has_edge (const Node_ &, const Node_ &) const |
const Edge_ | fetch_edge (const Node_ &, const Node_ &) const |
bool | has_outgoing_edges (const Node_ &) const |
Ordering functions | |
template<typename OutputIterator_> | |
void | topological_sort (OutputIterator_ i) const |
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::add_node | ( | const Node_ & | ) |
Add a node, if it does not already exist.
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_node | ( | const Node_ & | ) |
Delete a node, if it exists.
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_node | ( | const Node_ & | ) | const |
Return whether a node exists.
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::add_edge | ( | const Node_ & | , | |
const Node_ & | , | |||
const Edge_ & | ||||
) |
Add an edge, if it does not already exist.
NoSuchGraphNodeError | if either node is not in the graph. |
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_edge | ( | const Node_ & | , | |
const Node_ & | ||||
) |
Delete an edge, if it exists.
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_outgoing_edges | ( | const Node_ & | ) |
Delete all edges leaving a node.
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_incoming_edges | ( | const Node_ & | ) |
Delete all edges entering a node.
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_edge | ( | const Node_ & | , | |
const Node_ & | ||||
) | const |
Return whether an edge exists.
const Edge_ paludis::DirectedGraph< Node_, Edge_, Comparator_ >::fetch_edge | ( | const Node_ & | , | |
const Node_ & | ||||
) | const |
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_outgoing_edges | ( | const Node_ & | ) | const |
Return whether a node has outgoing edges.
NoSuchGraphNodeError | if the node does not exist. |
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::topological_sort | ( | OutputIterator_ | i | ) | const [inline] |
Place our nodes, topological sorted, into OutputIterator_.
NoGraphTopologicalOrderExistsError | if no such order exists. |