claw 1.9.0
 
Loading...
Searching...
No Matches
claw::topological_sort< Graph > Class Template Reference

Pass this class as the "Envents" template parameter of the depth scan class to sort the vertices of a graph with the topological sort algorithm. More...

#include <graph_algorithm.hpp>

Inheritance diagram for claw::topological_sort< Graph >:
Collaboration diagram for claw::topological_sort< Graph >:

Public Types

typedef scan_events< Graph >::vertex_type vertex_type
 
typedef std::vector< vertex_type > result_type
 
typedef result_type::const_iterator const_iterator
 
typedef topological_sort< Graph > self_type
 
- Public Types inherited from claw::scan_events< Graph >
typedef Graph::vertex_type vertex_type
 

Public Member Functions

void init (const Graph &g)
 
void end_vertex (const vertex_type &s)
 
void operator() (const Graph &g)
 
const vertex_type & operator[] (unsigned int index) const
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from claw::scan_events< Graph >
void init (const Graph &g)
 
void start_vertex (const vertex_type &v)
 
void visit_edge (const vertex_type &v1, const vertex_type &v2)
 
void end_vertex (const vertex_type &v)
 

Detailed Description

template<class Graph>
class claw::topological_sort< Graph >

Pass this class as the "Envents" template parameter of the depth scan class to sort the vertices of a graph with the topological sort algorithm.

When a node process ends, the node is added to a vector. The vector is filled from end to begining.

Definition at line 136 of file graph_algorithm.hpp.

Member Typedef Documentation

◆ const_iterator

template<class Graph>
typedef result_type::const_iterator claw::topological_sort< Graph >::const_iterator

Definition at line 141 of file graph_algorithm.hpp.

◆ result_type

template<class Graph>
typedef std::vector<vertex_type> claw::topological_sort< Graph >::result_type

Definition at line 140 of file graph_algorithm.hpp.

◆ self_type

template<class Graph>
typedef topological_sort<Graph> claw::topological_sort< Graph >::self_type

Definition at line 142 of file graph_algorithm.hpp.

◆ vertex_type

template<class Graph>
typedef scan_events<Graph>::vertex_type claw::topological_sort< Graph >::vertex_type

Definition at line 139 of file graph_algorithm.hpp.


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