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

#include <minimize-signature.hh>

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

Classes

struct  signature_equal_to
 
struct  signature_hasher
 
struct  state_output_for_label_t
 

Public Member Functions

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

Private Types

using automaton_t = Aut
 
using labelset_t = labelset_t_of< automaton_t >
 
using label_t = label_t_of< automaton_t >
 
using state_t = state_t_of< automaton_t >
 
using class_t = unsigned
 
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 state_output_t = std::vector< state_output_for_label_t >
 
using signature_multimap = std::unordered_map< state_t, set_t, signature_hasher, signature_equal_to >
 Cluster states per signature. 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...
 
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_tls_ = *a_->labelset()
 
unsigned num_classes_ = 0
 
class_to_set_t class_to_set_
 
state_to_class_t state_to_class_
 
std::unordered_map< state_t, state_output_tstate_to_state_output_
 Sort of a transition map for each state: state -> vector of (label, destination states). More...
 

Static Private Attributes

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

Detailed Description

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

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

Member Typedef Documentation

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

Definition at line 33 of file minimize-signature.hh.

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

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

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

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

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

Definition at line 36 of file minimize-signature.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, signature_tag >::labelset_t = labelset_t_of<automaton_t>
private

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

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

Definition at line 39 of file minimize-signature.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, signature_tag >::signature_multimap = std::unordered_map<state_t, set_t, signature_hasher, signature_equal_to>
private

Cluster states per signature.

This appears to be hashing on states, but we actually hash on the states' signatures behind the scene.

Definition at line 143 of file minimize-signature.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, signature_tag >::state_output_t = std::vector<state_output_for_label_t>
private

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

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

Definition at line 37 of file minimize-signature.hh.

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

Definition at line 40 of file minimize-signature.hh.

Constructor & Destructor Documentation

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

Definition at line 178 of file minimize-signature.hh.

References vcsn::detail::all_out(), vcsn::is_trim(), vcsn::require(), and vcsn::sort().

Here is the call graph for this function:

Member Function Documentation

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

Build the initial classes, and split until fix point.

Definition at line 215 of file minimize-signature.hh.

References vcsn::all().

Here is the call graph for this function:

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

The partition, as a list of classes.

Definition at line 207 of file minimize-signature.hh.

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

Definition at line 145 of file minimize-signature.hh.

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

Make a new class with the given set of states.

Parameters
setthe states belonging to this class
numberthe class number to use. If class_invalid, allocate one.

Definition at line 158 of file minimize-signature.hh.

References vcsn::set.

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

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

Member Data Documentation

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

Input automaton, supplied at construction time.

Definition at line 270 of file minimize-signature.hh.

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

An invalid class.

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

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

Definition at line 276 of file minimize-signature.hh.

template<Automaton Aut>
const labelset_t& vcsn::detail::minimizer< Aut, signature_tag >::ls_ = *a_->labelset()
private

Definition at line 272 of file minimize-signature.hh.

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

Definition at line 274 of file minimize-signature.hh.

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

Definition at line 277 of file minimize-signature.hh.

template<Automaton Aut>
std::unordered_map<state_t, state_output_t> vcsn::detail::minimizer< Aut, signature_tag >::state_to_state_output_
private

Sort of a transition map for each state: state -> vector of (label, destination states).

Definition at line 281 of file minimize-signature.hh.


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