![]() |
Vcsn
2.1
Be Rational
|
Apply a quotient onto an automaton: fuse equivalent states. More...
#include <quotient.hh>
Public Types | |
using | automaton_t = Aut |
using | quotient_t = partition_automaton_t< automaton_t > |
template<typename Ctx = context_t_of<Aut>> | |
using | fresh_automaton_t = fresh_automaton_t_of< automaton_t, Ctx > |
using | origins_t = origins_t_of< quotient_t > |
using | class_t = unsigned |
using | state_t = state_t_of< automaton_t > |
using | set_t = std::vector< state_t > |
using | state_to_class_t = std::unordered_map< state_t, class_t > |
using | class_to_set_t = std::vector< set_t > |
using | class_to_state_t = std::vector< state_t > |
Public Member Functions | |
quotienter (class_to_set_t &class_to_set) | |
void | sort_classes_ () |
Sort the classes. More... | |
quotient_t | operator() (const automaton_t &aut) |
Build the resulting automaton. More... | |
Private Attributes | |
class_to_set_t & | class_to_set_ |
unsigned | num_classes_ |
Apply a quotient onto an automaton: fuse equivalent states.
Aut | the type of the input automaton |
Definition at line 21 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::automaton_t = Aut |
Definition at line 24 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::class_t = unsigned |
Definition at line 32 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::class_to_set_t = std::vector<set_t> |
Definition at line 36 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::class_to_state_t = std::vector<state_t> |
Definition at line 37 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::fresh_automaton_t = fresh_automaton_t_of<automaton_t, Ctx> |
Definition at line 28 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::origins_t = origins_t_of<quotient_t> |
Definition at line 30 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::quotient_t = partition_automaton_t<automaton_t> |
Definition at line 25 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::set_t = std::vector<state_t> |
Definition at line 34 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::state_t = state_t_of<automaton_t> |
Definition at line 33 of file quotient.hh.
using vcsn::detail::quotienter< Aut >::state_to_class_t = std::unordered_map<state_t, class_t> |
Definition at line 35 of file quotient.hh.
|
inline |
class_to_set | The equivalence classes. Might be modified to put the states with the smallest ID first in their class. |
Definition at line 42 of file quotient.hh.
References vcsn::detail::quotienter< Aut >::sort_classes_().
|
inline |
Build the resulting automaton.
aut | the input automaton to quotient |
Definition at line 74 of file quotient.hh.
References vcsn::detail::quotienter< Aut >::class_to_set_, vcsn::make_fresh_automaton(), vcsn::make_partition_automaton(), vcsn::detail::quotienter< Aut >::num_classes_, and vcsn::set.
|
inline |
Sort the classes.
This step, which is "useless" in that the result would be correct anyway, just ensures that the classes are numbered after their states: classes are sorted by the smallest of their state ids.
Definition at line 55 of file quotient.hh.
References vcsn::detail::quotienter< Aut >::class_to_set_, vcsn::detail::quotienter< Aut >::num_classes_, and vcsn::sort().
Referenced by vcsn::detail::quotienter< Aut >::quotienter().
|
private |
Definition at line 112 of file quotient.hh.
Referenced by vcsn::detail::quotienter< Aut >::operator()(), and vcsn::detail::quotienter< Aut >::sort_classes_().
|
private |
Definition at line 113 of file quotient.hh.
Referenced by vcsn::detail::quotienter< Aut >::operator()(), and vcsn::detail::quotienter< Aut >::sort_classes_().