LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
misc::directed_graph< VertexLabel, EdgeLabel > Class Template Reference

#include <graph.hh>

Inheritance diagram for misc::directed_graph< VertexLabel, EdgeLabel >:
Collaboration diagram for misc::directed_graph< VertexLabel, EdgeLabel >:

Public Types

typedef directed_graph
< VertexLabel, EdgeLabel > 
self_type
typedef graph
< boost::bidirectionalS,
VertexLabel, EdgeLabel > 
super_type
typedef
super_type::vertex_descriptor 
vertex_descriptor
typedef boost::graph_traits
< self_type >::vertex_iterator 
vertex_iter_type
 Iterator on the vertices of a directed_graph.
typedef boost::graph_traits
< self_type >
::adjacency_iterator 
neighb_iter_type
 Iterator on the neighbors of the vertex of a directed_graph.
typedef boost::graph_traits
< self_type >::edge_iterator 
edge_iter_type
 Iterator on the edges of a graph.

Public Member Functions

virtual ~directed_graph ()
virtual void edge_add (const vertex_descriptor &v1, const vertex_descriptor &v2) override
 Add an edge between two vertices.
std::list< vertex_descriptortopological_sort () const
 Topological sort.
vertex_descriptor vertex_add (const VertexLabel &l)
 Add a vertex to the graph.
virtual std::ostream & print (std::ostream &ostr) const
virtual void print (std::string file) const
virtual std::ostream & epilogue_print (std::ostream &ostr) const
const std::string & name_get () const
void name_set (const std::string &name)

Member Typedef Documentation

typedef boost::graph_traits<self_type>::edge_iterator misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::edge_iter_type
inherited

Iterator on the edges of a graph.

template<typename VertexLabel = empty, typename EdgeLabel = empty>
typedef boost::graph_traits<self_type>::adjacency_iterator misc::directed_graph< VertexLabel, EdgeLabel >::neighb_iter_type

Iterator on the neighbors of the vertex of a directed_graph.

template<typename VertexLabel = empty, typename EdgeLabel = empty>
typedef directed_graph<VertexLabel, EdgeLabel> misc::directed_graph< VertexLabel, EdgeLabel >::self_type
template<typename VertexLabel = empty, typename EdgeLabel = empty>
typedef graph<boost::bidirectionalS, VertexLabel, EdgeLabel> misc::directed_graph< VertexLabel, EdgeLabel >::super_type
template<typename VertexLabel = empty, typename EdgeLabel = empty>
typedef super_type::vertex_descriptor misc::directed_graph< VertexLabel, EdgeLabel >::vertex_descriptor
template<typename VertexLabel = empty, typename EdgeLabel = empty>
typedef boost::graph_traits<self_type>::vertex_iterator misc::directed_graph< VertexLabel, EdgeLabel >::vertex_iter_type

Iterator on the vertices of a directed_graph.

Constructor & Destructor Documentation

template<typename VertexLabel , typename EdgeLabel >
misc::directed_graph< VertexLabel, EdgeLabel >::~directed_graph ( )
virtual

Member Function Documentation

template<typename VertexLabel , typename EdgeLabel >
void misc::directed_graph< VertexLabel, EdgeLabel >::edge_add ( const vertex_descriptor v1,
const vertex_descriptor v2 
)
overridevirtual

Add an edge between two vertices.

Iterators.This is just a wrapper around boost::add_edge.

Implements misc::graph< boost::bidirectionalS, VertexLabel, EdgeLabel >.

virtual std::ostream& misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::epilogue_print ( std::ostream &  ostr) const
virtualinherited
const std::string& misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::name_get ( ) const
inherited

Graph name.

void misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::name_set ( const std::string &  name)
inherited
virtual std::ostream& misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::print ( std::ostream &  ostr) const
virtualinherited

Graph pretty printing.

virtual void misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::print ( std::string  file) const
virtualinherited
template<typename NodeLabel , typename EdgeLabel >
std::list< typename directed_graph< NodeLabel, EdgeLabel >::vertex_descriptor > misc::directed_graph< NodeLabel, EdgeLabel >::topological_sort ( ) const

Topological sort.

This version (algorithm 17.5 in Modern Compiler Implementation in ML, p. 390) is not the same as boost::topological_sort since the former works on directed acyclic graphs (DAGs) and the latter doesn't.

vertex_descriptor misc::graph< boost::bidirectionalS , VertexLabel, EdgeLabel >::vertex_add ( const VertexLabel &  l)
inherited

Add a vertex to the graph.

Graph manipulation.Just a wrapper around boost::add_vertex.


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