![]() |
Vcsn
2.3a
Be Rational
|
Tarjan's algorithm to find all strongly connected components: iterative implementation. More...
#include <scc.hh>
Classes | |
struct | step_t |
Step of one state contain infomation next successor and end iterator(output transitions or successors of this state). More... | |
Public Types | |
using | state_t = state_t_of< Aut > |
using | transition_t = transition_t_of< Aut > |
using | component_t = detail::component_t< Aut > |
using | components_t = detail::components_t< Aut > |
Public Member Functions | |
scc_impl (const Aut &aut) | |
const components_t & | components () const |
Private Types | |
using | iterator_t = decltype(out(aut_, state_t{}).begin()) |
Iterator on outgoing transitions. More... | |
Private Member Functions | |
void | dfs (state_t s) |
Private Attributes | |
Aut | aut_ |
Input automaton. More... | |
std::vector< step_t > | dfs_stack_ |
std::size_t | curr_state_num_ = 0 |
The current visited state. More... | |
std::unordered_map< state_t, std::size_t > | number_ |
Store the visit order of each state. More... | |
std::unordered_map< state_t, std::size_t > | low_ |
low_[s] is minimum of state that it can go. More... | |
std::size_t | low_max_ = std::numeric_limits<unsigned int>::max() |
the maximum possible of a value in low_. More... | |
std::vector< state_t > | stack_ |
List of states in the same the component. More... | |
components_t | components_ |
All components. More... | |
Tarjan's algorithm to find all strongly connected components: iterative implementation.
Often slightly slower than the recursive implementation, but no limitation due to the stack.
using vcsn::detail::scc_impl< Aut, tarjan_iterative_tag >::component_t = detail::component_t<Aut> |
using vcsn::detail::scc_impl< Aut, tarjan_iterative_tag >::components_t = detail::components_t<Aut> |
|
private |
using vcsn::detail::scc_impl< Aut, tarjan_iterative_tag >::state_t = state_t_of<Aut> |
using vcsn::detail::scc_impl< Aut, tarjan_iterative_tag >::transition_t = transition_t_of<Aut> |
|
inline |
|
inline |
|
inlineprivate |
Definition at line 308 of file scc.hh.
References vcsn::has(), and vcsn::detail::out().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |