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

#include <minimize-signature.hh>

Collaboration diagram for vcsn::detail_signature::minimizer< Aut >:

Classes

class  signature_equal_to
 
class  signature_hasher
 
class  signature_multimap
 
struct  state_output_for_label_t
 

Public Types

using state_output_t = std::vector< state_output_for_label_t >
 
using label_to_states_t = std::map< label_t, std::vector< state_t >, vcsn::less< labelset_t >>
 

Public 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...
 
 minimizer (const Aut &a)
 
void build_classes_ ()
 Build the initial classes, and split until fix point. More...
 
partition_automaton< automaton_toperator() ()
 The minimized automaton. More...
 

Static Public Member Functions

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

Public Attributes

std::unordered_map< state_t,
state_output_t
state_to_state_output_
 

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 >
 

Static Private Member Functions

static constexpr const charme ()
 

Private Attributes

const automaton_ta_
 Input automaton, supplied at construction time. More...
 
const labelset_tls_
 
unsigned num_classes_ = 0
 
class_to_set_t class_to_set_
 
state_to_class_t state_to_class_
 

Static Private Attributes

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

Friends

class signature_hasher
 
class signature_equal_to
 
class signature_multimap
 

Detailed Description

template<typename Aut>
class vcsn::detail_signature::minimizer< Aut >

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

Member Typedef Documentation

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::automaton_t = Aut
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::class_t = unsigned
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::class_to_set_t = std::vector<set_t>
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::label_t = label_t_of<automaton_t>
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::label_to_states_t = std::map<label_t, std::vector<state_t>, vcsn::less<labelset_t>>

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::labelset_t = labelset_t_of<automaton_t>
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::set_t = std::vector<state_t>
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::state_output_t = std::vector<state_output_for_label_t>

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::state_t = state_t_of<automaton_t>
private

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

template<typename Aut>
using vcsn::detail_signature::minimizer< Aut >::state_to_class_t = std::unordered_map<state_t, class_t>
private

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

Constructor & Destructor Documentation

template<typename Aut>
vcsn::detail_signature::minimizer< Aut >::minimizer ( const Aut &  a)
inline

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

References vcsn::detail_signature::minimizer< Aut >::a_, vcsn::is_trim(), vcsn::detail_signature::minimizer< Aut >::me(), vcsn::require(), vcsn::sort(), and vcsn::detail_signature::minimizer< Aut >::state_to_state_output_.

Here is the call graph for this function:

Member Function Documentation

template<typename Aut>
static constexpr const char* vcsn::detail_signature::minimizer< Aut >::me ( )
inlinestaticprivate
template<typename Aut>
partition_automaton<automaton_t> vcsn::detail_signature::minimizer< Aut >::operator() ( )
inline

The minimized automaton.

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

References vcsn::detail_signature::minimizer< Aut >::a_, vcsn::detail_signature::minimizer< Aut >::build_classes_(), vcsn::detail_signature::minimizer< Aut >::class_to_set_, and vcsn::quotient().

Here is the call graph for this function:

template<typename Aut>
static std::ostream& vcsn::detail_signature::minimizer< Aut >::print_ ( const class_to_set_t c2ss,
std::ostream &  o 
)
inlinestatic

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

References vcsn::detail_signature::minimizer< Aut >::print_().

Here is the call graph for this function:

template<typename Aut>
static std::ostream& vcsn::detail_signature::minimizer< Aut >::print_ ( const state_output_t outs,
std::ostream &  o 
)
inlinestatic

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

Friends And Related Function Documentation

template<typename Aut>
friend class signature_equal_to
friend

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

template<typename Aut>
friend class signature_hasher
friend

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

template<typename Aut>
friend class signature_multimap
friend

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

Member Data Documentation

template<typename Aut>
constexpr class_t vcsn::detail_signature::minimizer< Aut >::class_invalid = -1
staticprivate
template<typename Aut>
const labelset_t& vcsn::detail_signature::minimizer< Aut >::ls_
private
template<typename Aut>
std::unordered_map<state_t, state_output_t> vcsn::detail_signature::minimizer< Aut >::state_to_state_output_

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