Vcsn
2.0
Be Rational
|
#include <enumerate.hh>
Public Types | |
using | automaton_t = Aut |
using | context_t = context_t_of< Aut > |
using | labelset_t = labelset_t_of< automaton_t > |
using | weightset_t = weightset_t_of< automaton_t > |
using | wordset_context_t = word_context_t< context_t > |
using | polynomialset_t = polynomialset< wordset_context_t > |
using | polynomial_t = typename polynomialset_t::value_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 | word_t = typename labelset_t::word_t |
using | monomial_t = std::pair< word_t, weight_t > |
Same as polynomial_t::value_type. More... | |
using | queue_t = std::queue< std::pair< state_t, monomial_t >> |
Public Member Functions | |
enumerater (const automaton_t &aut) | |
polynomial_t | enumerate (unsigned max) |
The weighted accepted word with length at most max. More... | |
polynomial_t | shortest (unsigned num) |
The shortest accepted weighted words, or throw an exception. More... | |
Private Member Functions | |
void | propagate_ (queue_t &q1) |
Process once all the states of q1. More... | |
Private Attributes | |
const automaton_t & | aut_ |
const weightset_t & | ws_ = *aut_->weightset() |
const polynomialset_t | ps_ = make_word_polynomialset(aut_->context()) |
const labelset_t_of < polynomialset_t > & | ls_ = *ps_.labelset() |
std::map< state_t, polynomial_t > | past_ |
For each state, the first orders of its past. More... | |
Definition at line 26 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::automaton_t = Aut |
Definition at line 29 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::context_t = context_t_of<Aut> |
Definition at line 30 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::label_t = label_t_of<automaton_t> |
Definition at line 39 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::labelset_t = labelset_t_of<automaton_t> |
Definition at line 34 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::monomial_t = std::pair<word_t, weight_t> |
Same as polynomial_t::value_type.
Definition at line 45 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::polynomial_t = typename polynomialset_t::value_t |
Definition at line 38 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::polynomialset_t = polynomialset<wordset_context_t> |
Definition at line 37 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::queue_t = std::queue<std::pair<state_t, monomial_t>> |
Definition at line 46 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::state_t = state_t_of<automaton_t> |
Definition at line 41 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::weight_t = weight_t_of<automaton_t> |
Definition at line 40 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::weightset_t = weightset_t_of<automaton_t> |
Definition at line 35 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::word_t = typename labelset_t::word_t |
Definition at line 42 of file enumerate.hh.
using vcsn::detail::enumerater< Aut >::wordset_context_t = word_context_t<context_t> |
Definition at line 36 of file enumerate.hh.
|
inline |
Definition at line 48 of file enumerate.hh.
References vcsn::detail::enumerater< Aut >::aut_, vcsn::polynomialset< Context >::one(), vcsn::detail::enumerater< Aut >::past_, and vcsn::detail::enumerater< Aut >::ps_.
|
inline |
The weighted accepted word with length at most max.
Definition at line 55 of file enumerate.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::detail::enumerater< Aut >::aut_, vcsn::detail::enumerater< Aut >::ls_, vcsn::polynomialset< Context >::monomial_one(), vcsn::detail::enumerater< Aut >::past_, vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::ps_.
Referenced by vcsn::enumerate().
|
inlineprivate |
Process once all the states of q1.
Save into q1 the new states to visit.
Definition at line 99 of file enumerate.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::detail::enumerater< Aut >::aut_, vcsn::detail::enumerater< Aut >::ls_, vcsn::detail::enumerater< Aut >::past_, vcsn::detail::enumerater< Aut >::ps_, and vcsn::detail::enumerater< Aut >::ws_.
Referenced by vcsn::detail::enumerater< Aut >::enumerate(), and vcsn::detail::enumerater< Aut >::shortest().
|
inline |
The shortest accepted weighted words, or throw an exception.
Definition at line 76 of file enumerate.hh.
References vcsn::polynomialset< Context >::add_here(), vcsn::detail::enumerater< Aut >::aut_, vcsn::detail::enumerater< Aut >::ls_, vcsn::polynomialset< Context >::monomial_one(), vcsn::detail::enumerater< Aut >::past_, vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::ps_.
Referenced by vcsn::shortest().
|
private |
Definition at line 120 of file enumerate.hh.
Referenced by vcsn::detail::enumerater< Aut >::enumerate(), vcsn::detail::enumerater< Aut >::enumerater(), vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::shortest().
|
private |
Definition at line 123 of file enumerate.hh.
Referenced by vcsn::detail::enumerater< Aut >::enumerate(), vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::shortest().
|
private |
For each state, the first orders of its past.
Definition at line 125 of file enumerate.hh.
Referenced by vcsn::detail::enumerater< Aut >::enumerate(), vcsn::detail::enumerater< Aut >::enumerater(), vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::shortest().
|
private |
Definition at line 122 of file enumerate.hh.
Referenced by vcsn::detail::enumerater< Aut >::enumerate(), vcsn::detail::enumerater< Aut >::enumerater(), vcsn::detail::enumerater< Aut >::propagate_(), and vcsn::detail::enumerater< Aut >::shortest().
|
private |
Definition at line 121 of file enumerate.hh.
Referenced by vcsn::detail::enumerater< Aut >::propagate_().