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

#include <minimize-weighted.hh>

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

Classes

struct  classset
 Dealing with class numbers. More...
 
struct  signature_equal_to
 
struct  signature_hasher
 

Public Member Functions

 minimizer (const Aut &a)
 
class_to_set_tclasses ()
 The minimized automaton. More...
 
void build_classes_ ()
 Build the initial classes, and split until fix point. More...
 

Public Attributes

automaton_t a_
 Input automaton, supplied at construction time. More...
 
const labelset_tls_ = *a_->labelset()
 
const weightset_tws_ = *a_->weightset()
 
unsigned num_classes_ = 0
 
class_to_set_t class_to_set_
 
state_to_class_t state_to_class_
 
class_polynomialset_t cps_ {{classset{}, ws_}}
 Class polynomialset. More...
 

Private Types

using automaton_t = Aut
 
using labelset_t = labelset_t_of< automaton_t >
 
using weightset_t = weightset_t_of< automaton_t >
 
using label_t = label_t_of< automaton_t >
 
using weight_t = weight_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 class_polynomialset_t = polynomialset< context< classset, weightset_t >>
 The output of a given letter from a given state, keeping into account classes and weights. More...
 
using class_polynomial_t = typename class_polynomialset_t::value_t
 
using signature_t = std::map< label_t, class_polynomial_t >
 A signature: for each label, the outgoing class polynomial. More...
 
using signature_multimap = std::unordered_map< signature_t, set_t, signature_hasher, signature_equal_to >
 Cluster states per signature. More...
 

Private Member Functions

signature_t signature (state_t s) const
 The signature of state s. More...
 
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...
 

Static Private Member Functions

static constexpr const charme ()
 

Static Private Attributes

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

Detailed Description

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

Definition at line 23 of file minimize-weighted.hh.

Member Typedef Documentation

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

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

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, weighted_tag >::class_polynomial_t = typename class_polynomialset_t::value_t
private

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

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, weighted_tag >::class_polynomialset_t = polynomialset<context<classset, weightset_t>>
private

The output of a given letter from a given state, keeping into account classes and weights.

Definition at line 66 of file minimize-weighted.hh.

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

Definition at line 32 of file minimize-weighted.hh.

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

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

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

Definition at line 29 of file minimize-weighted.hh.

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

Definition at line 27 of file minimize-weighted.hh.

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

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

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

Cluster states per signature.

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

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, weighted_tag >::signature_t = std::map<label_t, class_polynomial_t>
private

A signature: for each label, the outgoing class polynomial.

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

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

Definition at line 31 of file minimize-weighted.hh.

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

Definition at line 34 of file minimize-weighted.hh.

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, weighted_tag >::weight_t = weight_t_of<automaton_t>
private

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

template<Automaton Aut>
using vcsn::detail::minimizer< Aut, weighted_tag >::weightset_t = weightset_t_of<automaton_t>
private

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

Constructor & Destructor Documentation

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

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

References 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, weighted_tag >::build_classes_ ( )
inline

Build the initial classes, and split until fix point.

Definition at line 172 of file minimize-weighted.hh.

References vcsn::all().

Here is the call graph for this function:

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

The minimized automaton.

Definition at line 165 of file minimize-weighted.hh.

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

Definition at line 125 of file minimize-weighted.hh.

template<Automaton Aut>
class_t vcsn::detail::minimizer< Aut, weighted_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 138 of file minimize-weighted.hh.

References vcsn::set.

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

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

template<Automaton Aut>
signature_t vcsn::detail::minimizer< Aut, weighted_tag >::signature ( state_t  s) const
inlineprivate

The signature of state s.

Definition at line 73 of file minimize-weighted.hh.

References vcsn::detail::all_out().

Here is the call graph for this function:

Member Data Documentation

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

Input automaton, supplied at construction time.

Definition at line 226 of file minimize-weighted.hh.

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

An invalid class.

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

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

Definition at line 233 of file minimize-weighted.hh.

template<Automaton Aut>
class_polynomialset_t vcsn::detail::minimizer< Aut, weighted_tag >::cps_ {{classset{}, ws_}}

Class polynomialset.

Definition at line 237 of file minimize-weighted.hh.

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

Definition at line 228 of file minimize-weighted.hh.

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

Definition at line 231 of file minimize-weighted.hh.

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

Definition at line 234 of file minimize-weighted.hh.

template<Automaton Aut>
const weightset_t& vcsn::detail::minimizer< Aut, weighted_tag >::ws_ = *a_->weightset()

Definition at line 229 of file minimize-weighted.hh.


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