Vcsn  2.2
Be Rational
vcsn::detail::minimizer< Aut, moore_tag > Class Template Reference

#include <minimize-moore.hh>

Collaboration diagram for vcsn::detail::minimizer< Aut, moore_tag >:

Public Member Functions

 minimizer (const Aut &a)
 Build the minimizer. Computes the classes. More...
 
class_to_set_tclasses ()
 The partition, as a list of classes. More...
 

Private Types

using automaton_t = Aut
 
using label_t = label_t_of< automaton_t >
 
using state_t = state_t_of< automaton_t >
 
using class_t = unsigned
 
using classes_t = std::vector< class_t >
 
using set_t = std::vector< state_t >
 
using state_to_class_t = std::unordered_map< state_t, class_t >
 
using target_class_to_states_t = std::unordered_map< class_t, set_t >
 
using class_to_set_t = std::vector< set_t >
 
using transition_map_t = detail::transition_map< automaton_t, weightset_t_of< automaton_t >, true, true >
 An auxiliary data structure enabling fast access to transitions from a given state and label, in random order. More...
 

Private Member Functions

void clear ()
 
class_t make_class (set_t &&set, class_t number=class_invalid)
 Make a new class with the given set of states. More...
 
class_t out_class (state_t s, label_t l)
 The destination class of s with l in a. More...
 
void build_classes_ ()
 Build the initial classes, and split until fix point. More...
 

Static Private Member Functions

static constexpr const charme ()
 

Private Attributes

automaton_t a_
 Input automaton, supplied at construction time. More...
 
const labelset_t_of< Aut >::genset_t gs_
 The generators. More...
 
unsigned num_classes_ = 0
 
class_to_set_t class_to_set_
 
state_to_class_t state_to_class_
 
transition_map_t transition_map_
 

Static Private Attributes

static constexpr class_t class_invalid = -1
 An invalid class. More...
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::minimizer< Aut, moore_tag >

Definition at line 28 of file minimize-moore.hh.

Member Typedef Documentation

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::automaton_t = Aut
private

Definition at line 35 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::class_t = unsigned
private

Definition at line 45 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::class_to_set_t = std::vector<set_t>
private

Definition at line 50 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::classes_t = std::vector<class_t>
private

Definition at line 46 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::label_t = label_t_of<automaton_t>
private

Definition at line 43 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::set_t = std::vector<state_t>
private

Definition at line 47 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::state_t = state_t_of<automaton_t>
private

Definition at line 44 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::state_to_class_t = std::unordered_map<state_t, class_t>
private

Definition at line 48 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::target_class_to_states_t = std::unordered_map<class_t, set_t>
private

Definition at line 49 of file minimize-moore.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, moore_tag >::transition_map_t = detail::transition_map<automaton_t, weightset_t_of<automaton_t>, true, true>
private

An auxiliary data structure enabling fast access to transitions from a given state and label, in random order.

Definition at line 68 of file minimize-moore.hh.

Constructor & Destructor Documentation

template<Automaton Aut>
vcsn::detail::minimizer< Aut, moore_tag >::minimizer ( const Aut &  a)
inline

Build the minimizer. Computes the classes.

Definition at line 115 of file minimize-moore.hh.

References vcsn::is_deterministic(), vcsn::is_trim(), and vcsn::require().

Here is the call graph for this function:

Member Function Documentation

template<Automaton Aut>
void vcsn::detail::minimizer< Aut, moore_tag >::build_classes_ ( )
inlineprivate

Build the initial classes, and split until fix point.

Definition at line 135 of file minimize-moore.hh.

template<Automaton Aut>
class_to_set_t& vcsn::detail::minimizer< Aut, moore_tag >::classes ( )
inline

The partition, as a list of classes.

Definition at line 127 of file minimize-moore.hh.

template<Automaton Aut>
void vcsn::detail::minimizer< Aut, moore_tag >::clear ( )
inlineprivate

Definition at line 71 of file minimize-moore.hh.

template<Automaton Aut>
class_t vcsn::detail::minimizer< Aut, moore_tag >::make_class ( set_t &&  set,
class_t  number = class_invalid 
)
inlineprivate

Make a new class with the given set of states.

Definition at line 80 of file minimize-moore.hh.

References vcsn::set.

template<Automaton Aut>
static constexpr const char* vcsn::detail::minimizer< Aut, moore_tag >::me ( )
inlinestaticprivate

Definition at line 52 of file minimize-moore.hh.

template<Automaton Aut>
class_t vcsn::detail::minimizer< Aut, moore_tag >::out_class ( state_t  s,
label_t  l 
)
inlineprivate

The destination class of s with l in a.

Return class_invalid if s has no successor with l.

Definition at line 103 of file minimize-moore.hh.

References vcsn::detail::map().

Here is the call graph for this function:

Member Data Documentation

template<Automaton Aut>
automaton_t vcsn::detail::minimizer< Aut, moore_tag >::a_
private

Input automaton, supplied at construction time.

Definition at line 38 of file minimize-moore.hh.

template<Automaton Aut>
constexpr class_t vcsn::detail::minimizer< Aut, moore_tag >::class_invalid = -1
staticprivate

An invalid class.

Definition at line 55 of file minimize-moore.hh.

template<Automaton Aut>
class_to_set_t vcsn::detail::minimizer< Aut, moore_tag >::class_to_set_
private

Definition at line 59 of file minimize-moore.hh.

template<Automaton Aut>
const labelset_t_of<Aut>::genset_t vcsn::detail::minimizer< Aut, moore_tag >::gs_
private

The generators.

Definition at line 41 of file minimize-moore.hh.

template<Automaton Aut>
unsigned vcsn::detail::minimizer< Aut, moore_tag >::num_classes_ = 0
private

Definition at line 56 of file minimize-moore.hh.

template<Automaton Aut>
state_to_class_t vcsn::detail::minimizer< Aut, moore_tag >::state_to_class_
private

Definition at line 60 of file minimize-moore.hh.

template<Automaton Aut>
transition_map_t vcsn::detail::minimizer< Aut, moore_tag >::transition_map_
private

Definition at line 69 of file minimize-moore.hh.


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