paludis  Version 2.6.0
List of all members
paludis::DirectedGraph< Node_, Edge_, Comparator_ > Class Template Reference

#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
 

Detailed Description

template<typename Node_, typename Edge_, typename Comparator_>
class paludis::DirectedGraph< Node_, Edge_, Comparator_ >

A simple directed graph.

Member Function Documentation

template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::add_edge ( const Node_ &  ,
const Node_ &  ,
const Edge_ &   
)

Add an edge, if it does not already exist.

Exceptions
NoSuchGraphNodeErrorif either node is not in the graph.
template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::add_node ( const Node_ &  )

Add a node, if it does not already exist.

template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_edge ( const Node_ &  ,
const Node_ &   
)

Delete an edge, if it exists.

template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_incoming_edges ( const Node_ &  )

Delete all edges entering a node.

template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_node ( const Node_ &  )

Delete a node, if it exists.

template<typename Node_ , typename Edge_ , typename Comparator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::delete_outgoing_edges ( const Node_ &  )

Delete all edges leaving a node.

template<typename Node_ , typename Edge_ , typename Comparator_ >
const Edge_ paludis::DirectedGraph< Node_, Edge_, Comparator_ >::fetch_edge ( const Node_ &  ,
const Node_ &   
) const

Fetch an edge.

Exceptions
NoSuchGraphEdgeErrorif the edge does not exist.
template<typename Node_ , typename Edge_ , typename Comparator_ >
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_edge ( const Node_ &  ,
const Node_ &   
) const

Return whether an edge exists.

template<typename Node_ , typename Edge_ , typename Comparator_ >
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_node ( const Node_ &  ) const

Return whether a node exists.

template<typename Node_ , typename Edge_ , typename Comparator_ >
bool paludis::DirectedGraph< Node_, Edge_, Comparator_ >::has_outgoing_edges ( const Node_ &  ) const

Return whether a node has outgoing edges.

Exceptions
NoSuchGraphNodeErrorif the node does not exist.
template<typename Node_ , typename Edge_ , typename Comparator_ >
template<typename OutputIterator_ >
void paludis::DirectedGraph< Node_, Edge_, Comparator_ >::topological_sort ( OutputIterator_  i) const

Place our nodes, topological sorted, into OutputIterator_.

Exceptions
NoGraphTopologicalOrderExistsErrorif no such order exists.

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