Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::detail::quotienter< Aut > Class Template Reference

Apply a quotient onto an automaton: fuse equivalent states. More...

#include <quotient.hh>

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

Public Types

using automaton_t = Aut
 
using partition_automaton_t = partition_automaton< automaton_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...
 
partition_automaton_t build_result_ (const automaton_t &aut)
 Build the resulting automaton. More...
 
partition_automaton_t operator() (const automaton_t &aut)
 The minimized automaton. More...
 

Private Member Functions

std::ostream & print_ (const set_t &ss, std::ostream &o) const
 
std::ostream & print_ (const class_to_set_t &c2ss, std::ostream &o) const
 

Private Attributes

class_to_set_tclass_to_set_
 
unsigned num_classes_
 
class_to_state_t class_to_res_state_
 

Detailed Description

template<typename Aut>
class vcsn::detail::quotienter< Aut >

Apply a quotient onto an automaton: fuse equivalent states.

Definition at line 21 of file quotient.hh.

Member Typedef Documentation

template<typename Aut>
using vcsn::detail::quotienter< Aut >::automaton_t = Aut

Definition at line 24 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::class_t = unsigned

Definition at line 27 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::class_to_set_t = std::vector<set_t>

Definition at line 31 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::class_to_state_t = std::vector<state_t>

Definition at line 32 of file quotient.hh.

Definition at line 25 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::set_t = std::vector<state_t>

Definition at line 29 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::state_t = state_t_of<automaton_t>

Definition at line 28 of file quotient.hh.

template<typename Aut>
using vcsn::detail::quotienter< Aut >::state_to_class_t = std::unordered_map<state_t, class_t>

Definition at line 30 of file quotient.hh.

Constructor & Destructor Documentation

template<typename Aut>
vcsn::detail::quotienter< Aut >::quotienter ( class_to_set_t class_to_set)
inline
Parameters
class_to_setThe equivalence classes. Might be modified to put the states with the smallest ID first in their class.

Definition at line 37 of file quotient.hh.

References vcsn::detail::quotienter< Aut >::sort_classes_().

Here is the call graph for this function:

Member Function Documentation

template<typename Aut>
partition_automaton_t vcsn::detail::quotienter< Aut >::operator() ( const automaton_t aut)
inline

The minimized automaton.

Definition at line 104 of file quotient.hh.

References vcsn::detail::quotienter< Aut >::build_result_().

Here is the call graph for this function:

template<typename Aut>
std::ostream& vcsn::detail::quotienter< Aut >::print_ ( const set_t ss,
std::ostream &  o 
) const
inlineprivate

Definition at line 110 of file quotient.hh.

Referenced by vcsn::detail::quotienter< Aut >::print_().

template<typename Aut>
std::ostream& vcsn::detail::quotienter< Aut >::print_ ( const class_to_set_t c2ss,
std::ostream &  o 
) const
inlineprivate

Definition at line 121 of file quotient.hh.

References vcsn::detail::quotienter< Aut >::print_().

Here is the call graph for this function:

template<typename Aut>
void vcsn::detail::quotienter< Aut >::sort_classes_ ( )
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 50 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().

Here is the call graph for this function:

Member Data Documentation

template<typename Aut>
class_to_state_t vcsn::detail::quotienter< Aut >::class_to_res_state_
private

Definition at line 136 of file quotient.hh.

Referenced by vcsn::detail::quotienter< Aut >::build_result_().

template<typename Aut>
class_to_set_t& vcsn::detail::quotienter< Aut >::class_to_set_
private
template<typename Aut>
unsigned vcsn::detail::quotienter< Aut >::num_classes_
private

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