Vcsn  2.8
Be Rational
vcsn::detail::is_acyclic_impl< Aut > Class Template Reference

Detect circuits. More...

#include <is-acyclic.hh>

Collaboration diagram for vcsn::detail::is_acyclic_impl< Aut >:

Public Types

using automaton_t = std::remove_cv_t< Aut >
 
using state_t = state_t_of< automaton_t >
 
using label_t = label_t_of< automaton_t >
 

Public Member Functions

 is_acyclic_impl (const automaton_t &aut, boost::optional< label_t > label={})
 
bool operator() ()
 Whether the automaton is acyclic. More...
 

Private Types

enum  status { unknown, ok, circuit }
 

Private Member Functions

bool has_circuit_ (state_t s)
 Whether a circuit is accessible from s. More...
 

Private Attributes

std::unordered_map< state_t, statustag_
 
automaton_t aut_
 
boost::optional< label_tone_
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::is_acyclic_impl< Aut >

Detect circuits.

Definition at line 20 of file is-acyclic.hh.

Member Typedef Documentation

◆ automaton_t

template<Automaton Aut>
using vcsn::detail::is_acyclic_impl< Aut >::automaton_t = std::remove_cv_t<Aut>

Definition at line 23 of file is-acyclic.hh.

◆ label_t

template<Automaton Aut>
using vcsn::detail::is_acyclic_impl< Aut >::label_t = label_t_of<automaton_t>

Definition at line 25 of file is-acyclic.hh.

◆ state_t

template<Automaton Aut>
using vcsn::detail::is_acyclic_impl< Aut >::state_t = state_t_of<automaton_t>

Definition at line 24 of file is-acyclic.hh.

Member Enumeration Documentation

◆ status

template<Automaton Aut>
enum vcsn::detail::is_acyclic_impl::status
private
Enumerator
unknown 

The graph reachable from s is under exploration.

ok 

There is no circuit accessible from s.

circuit 

There is an circuit accessible from s.

Definition at line 90 of file is-acyclic.hh.

Constructor & Destructor Documentation

◆ is_acyclic_impl()

template<Automaton Aut>
vcsn::detail::is_acyclic_impl< Aut >::is_acyclic_impl ( const automaton_t aut,
boost::optional< label_t label = {} 
)
inline

Member Function Documentation

◆ has_circuit_()

template<Automaton Aut>
bool vcsn::detail::is_acyclic_impl< Aut >::has_circuit_ ( state_t  s)
inlineprivate

Whether a circuit is accessible from s.

Definition at line 42 of file is-acyclic.hh.

References vcsn::detail::is_acyclic_impl< Aut >::aut_, BUILTIN_UNREACHABLE, vcsn::detail::is_acyclic_impl< Aut >::circuit, vcsn::detail::is_acyclic_impl< Aut >::ok, vcsn::detail::is_acyclic_impl< Aut >::one_, vcsn::detail::out(), vcsn::detail::is_acyclic_impl< Aut >::tag_, and vcsn::detail::is_acyclic_impl< Aut >::unknown.

Referenced by vcsn::detail::is_acyclic_impl< Aut >::operator()().

Here is the call graph for this function:

◆ operator()()

template<Automaton Aut>
bool vcsn::detail::is_acyclic_impl< Aut >::operator() ( )
inline

Whether the automaton is acyclic.

Definition at line 34 of file is-acyclic.hh.

References vcsn::detail::is_acyclic_impl< Aut >::aut_, vcsn::detail::is_acyclic_impl< Aut >::has_circuit_(), and vcsn::detail::none_of().

Here is the call graph for this function:

Member Data Documentation

◆ aut_

◆ one_

template<Automaton Aut>
boost::optional<label_t> vcsn::detail::is_acyclic_impl< Aut >::one_
private

◆ tag_

template<Automaton Aut>
std::unordered_map<state_t, status> vcsn::detail::is_acyclic_impl< Aut >::tag_
private

Definition at line 101 of file is-acyclic.hh.

Referenced by vcsn::detail::is_acyclic_impl< Aut >::has_circuit_().


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