Vcsn
2.1
Be Rational
|
#include <minimize-weighted.hh>
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_t & | classes () |
The minimized automaton. More... | |
void | build_classes_ () |
Build the initial classes, and split until fix point. 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 char * | me () |
Private Attributes | |
automaton_t | a_ |
Input automaton, supplied at construction time. More... | |
const labelset_t & | ls_ |
const weightset_t & | ws_ |
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... | |
Static Private Attributes | |
static constexpr class_t | class_invalid = -1 |
An invalid class. More... | |
Definition at line 21 of file minimize-weighted.hh.
|
private |
Definition at line 23 of file minimize-weighted.hh.
|
private |
Definition at line 81 of file minimize-weighted.hh.
|
private |
The output of a given letter from a given state, keeping into account classes and weights.
Definition at line 76 of file minimize-weighted.hh.
|
private |
Definition at line 37 of file minimize-weighted.hh.
|
private |
Definition at line 40 of file minimize-weighted.hh.
|
private |
Definition at line 34 of file minimize-weighted.hh.
|
private |
Definition at line 28 of file minimize-weighted.hh.
|
private |
Definition at line 38 of file minimize-weighted.hh.
|
private |
Cluster states per signature.
Definition at line 136 of file minimize-weighted.hh.
|
private |
A signature: for each label, the outgoing class polynomial.
Definition at line 84 of file minimize-weighted.hh.
|
private |
Definition at line 36 of file minimize-weighted.hh.
|
private |
Definition at line 39 of file minimize-weighted.hh.
|
private |
Definition at line 35 of file minimize-weighted.hh.
|
private |
Definition at line 31 of file minimize-weighted.hh.
|
inline |
Definition at line 171 of file minimize-weighted.hh.
References vcsn::is_trim(), vcsn::detail_weighted::minimizer< Aut >::me(), and vcsn::require().
|
inline |
Build the initial classes, and split until fix point.
Definition at line 187 of file minimize-weighted.hh.
References vcsn::detail_weighted::minimizer< Aut >::class_invalid, vcsn::detail_weighted::minimizer< Aut >::classes(), vcsn::detail_weighted::minimizer< Aut >::make_class(), and vcsn::detail_weighted::minimizer< Aut >::signature().
Referenced by vcsn::detail_weighted::minimizer< Aut >::classes().
|
inline |
The minimized automaton.
Definition at line 180 of file minimize-weighted.hh.
References vcsn::detail_weighted::minimizer< Aut >::build_classes_(), and vcsn::detail_weighted::minimizer< Aut >::class_to_set_.
Referenced by vcsn::detail_weighted::minimizer< Aut >::build_classes_().
|
inlineprivate |
Definition at line 138 of file minimize-weighted.hh.
|
inlineprivate |
Make a new class with the given set of states.
set | the states belonging to this class |
number | the class number to use. If class_invalid, allocate one. |
Definition at line 151 of file minimize-weighted.hh.
References vcsn::set.
Referenced by vcsn::detail_weighted::minimizer< Aut >::build_classes_().
|
inlinestaticprivate |
Definition at line 42 of file minimize-weighted.hh.
Referenced by vcsn::detail_weighted::minimizer< Aut >::minimizer().
|
inlineprivate |
The signature of state s.
Definition at line 86 of file minimize-weighted.hh.
References vcsn::detail_weighted::minimizer< Aut >::cps_.
Referenced by vcsn::detail_weighted::minimizer< Aut >::build_classes_().
|
private |
Input automaton, supplied at construction time.
Definition at line 26 of file minimize-weighted.hh.
|
staticprivate |
An invalid class.
Definition at line 45 of file minimize-weighted.hh.
Referenced by vcsn::detail_weighted::minimizer< Aut >::build_classes_().
|
private |
Definition at line 48 of file minimize-weighted.hh.
Referenced by vcsn::detail_weighted::minimizer< Aut >::classes().
|
private |
Class polynomialset.
Definition at line 79 of file minimize-weighted.hh.
Referenced by vcsn::detail_weighted::minimizer< Aut >::signature_hasher::operator()(), vcsn::detail_weighted::minimizer< Aut >::signature_equal_to::operator()(), and vcsn::detail_weighted::minimizer< Aut >::signature().
|
private |
Definition at line 29 of file minimize-weighted.hh.
Referenced by vcsn::detail_weighted::minimizer< Aut >::signature_hasher::operator()(), and vcsn::detail_weighted::minimizer< Aut >::signature_equal_to::operator()().
|
private |
Definition at line 46 of file minimize-weighted.hh.
|
private |
Definition at line 49 of file minimize-weighted.hh.
|
private |
Definition at line 32 of file minimize-weighted.hh.