Vcsn  2.8
Be Rational
vcsn::detail::evaluator< Aut > Class Template Reference

Evaluate a word on an automaton. More...

#include <evaluate.hh>

Collaboration diagram for vcsn::detail::evaluator< Aut >:

Classes

struct  labeled_weight
 

Public Member Functions

 evaluator (const automaton_t &a)
 
template<typename LabelSet = labelset_t>
std::enable_if_t<!LabelSet::is_free(), weight_toperator() (const word_t &word) const
 Evaluation of a word. More...
 
template<typename LabelSet = labelset_t>
std::enable_if_t< LabelSet::is_free(), weight_toperator() (const word_t &word) const
 
weight_t operator() (const polynomial_t &poly) const
 Polynomial implementation. More...
 

Private Types

using automaton_t = Aut
 
using labelset_t = labelset_t_of< automaton_t >
 
using state_t = state_t_of< automaton_t >
 
using word_t = word_t_of< automaton_t >
 
using wordset_t = law_t< labelset_t >
 
using context_t = context_t_of< automaton_t >
 
using wps_t = word_polynomialset_t< context_t >
 
using polynomial_t = typename wps_t::value_t
 
using weightset_t = weightset_t_of< automaton_t >
 
using weight_t = typename weightset_t::value_t
 
using weights_t = std::vector< weight_t >
 state -> weight. More...
 

Private Attributes

automaton_t aut_
 
const weightset_tws_ = *aut_->weightset()
 
const labelset_tls_ = *aut_->labelset()
 
const wordset_t wordset_ = make_wordset(*aut_->labelset())
 
const wps_t wps_ = make_word_polynomialset(aut_->context())
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::evaluator< Aut >

Evaluate a word on an automaton.

Definition at line 23 of file evaluate.hh.

Member Typedef Documentation

◆ automaton_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::automaton_t = Aut
private

Definition at line 25 of file evaluate.hh.

◆ context_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::context_t = context_t_of<automaton_t>
private

Definition at line 30 of file evaluate.hh.

◆ labelset_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::labelset_t = labelset_t_of<automaton_t>
private

Definition at line 26 of file evaluate.hh.

◆ polynomial_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::polynomial_t = typename wps_t::value_t
private

Definition at line 32 of file evaluate.hh.

◆ state_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::state_t = state_t_of<automaton_t>
private

Definition at line 27 of file evaluate.hh.

◆ weight_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::weight_t = typename weightset_t::value_t
private

Definition at line 34 of file evaluate.hh.

◆ weights_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::weights_t = std::vector<weight_t>
private

state -> weight.

Definition at line 37 of file evaluate.hh.

◆ weightset_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::weightset_t = weightset_t_of<automaton_t>
private

Definition at line 33 of file evaluate.hh.

◆ word_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::word_t = word_t_of<automaton_t>
private

Definition at line 28 of file evaluate.hh.

◆ wordset_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::wordset_t = law_t<labelset_t>
private

Definition at line 29 of file evaluate.hh.

◆ wps_t

template<Automaton Aut>
using vcsn::detail::evaluator< Aut >::wps_t = word_polynomialset_t<context_t>
private

Definition at line 31 of file evaluate.hh.

Constructor & Destructor Documentation

◆ evaluator()

template<Automaton Aut>
vcsn::detail::evaluator< Aut >::evaluator ( const automaton_t a)
inline

Definition at line 40 of file evaluate.hh.

Member Function Documentation

◆ operator()() [1/3]

template<Automaton Aut>
template<typename LabelSet = labelset_t>
std::enable_if_t<!LabelSet::is_free(), weight_t> vcsn::detail::evaluator< Aut >::operator() ( const word_t word) const
inline

Evaluation of a word.

Definition at line 61 of file evaluate.hh.

References vcsn::detail::all_out(), vcsn::detail::evaluator< Aut >::aut_, vcsn::detail::evaluator< Aut >::ls_, vcsn::res, vcsn::detail::evaluator< Aut >::wordset_, and vcsn::detail::evaluator< Aut >::ws_.

Here is the call graph for this function:

◆ operator()() [2/3]

template<Automaton Aut>
template<typename LabelSet = labelset_t>
std::enable_if_t<LabelSet::is_free(), weight_t> vcsn::detail::evaluator< Aut >::operator() ( const word_t word) const
inline

Definition at line 96 of file evaluate.hh.

References vcsn::detail::evaluator< Aut >::aut_, vcsn::detail::evaluator< Aut >::labeled_weight::l, vcsn::detail::evaluator< Aut >::ls_, vcsn::detail::out(), vcsn::detail::evaluator< Aut >::labeled_weight::s, vcsn::detail::states_size(), vcsn::detail::swap(), and vcsn::detail::evaluator< Aut >::ws_.

Here is the call graph for this function:

◆ operator()() [3/3]

template<Automaton Aut>
weight_t vcsn::detail::evaluator< Aut >::operator() ( const polynomial_t poly) const
inline

Polynomial implementation.

Definition at line 147 of file evaluate.hh.

References vcsn::label_of(), vcsn::res, vcsn::weight_of(), and vcsn::detail::evaluator< Aut >::ws_.

Here is the call graph for this function:

Member Data Documentation

◆ aut_

template<Automaton Aut>
automaton_t vcsn::detail::evaluator< Aut >::aut_
private

Definition at line 170 of file evaluate.hh.

Referenced by vcsn::detail::evaluator< Aut >::operator()().

◆ ls_

template<Automaton Aut>
const labelset_t& vcsn::detail::evaluator< Aut >::ls_ = *aut_->labelset()
private

Definition at line 172 of file evaluate.hh.

Referenced by vcsn::detail::evaluator< Aut >::operator()().

◆ wordset_

template<Automaton Aut>
const wordset_t vcsn::detail::evaluator< Aut >::wordset_ = make_wordset(*aut_->labelset())
private

Definition at line 173 of file evaluate.hh.

Referenced by vcsn::detail::evaluator< Aut >::operator()().

◆ wps_

template<Automaton Aut>
const wps_t vcsn::detail::evaluator< Aut >::wps_ = make_word_polynomialset(aut_->context())
private

Definition at line 174 of file evaluate.hh.

◆ ws_

template<Automaton Aut>
const weightset_t& vcsn::detail::evaluator< Aut >::ws_ = *aut_->weightset()
private

Definition at line 171 of file evaluate.hh.

Referenced by vcsn::detail::evaluator< Aut >::operator()().


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