Vcsn  2.4
Be Rational
multiply.hh File Reference
#include <unordered_map>
#include <vcsn/algos/copy.hh>
#include <vcsn/algos/determinize.hh>
#include <vcsn/algos/standard.hh>
#include <vcsn/algos/star.hh>
#include <vcsn/algos/add.hh>
#include <vcsn/algos/tags.hh>
#include <vcsn/core/automaton.hh>
#include <vcsn/core/join.hh>
#include <vcsn/core/rat/expressionset.hh>
#include <vcsn/dyn/automaton.hh>
#include <vcsn/dyn/value.hh>
#include <vcsn/misc/raise.hh>
#include <vcsn/misc/to.hh>
#include <vcsn/misc/type_traits.hh>
#include <vcsn/misc/vector.hh>
Include dependency graph for multiply.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 vcsn
 
 vcsn::dyn
 
 vcsn::dyn::detail
 

Typedefs

template<typename ValueSet >
using vcsn::add_mem_fn_t = decltype(std::declval< ValueSet >().add(std::declval< typename ValueSet::value_t >(), std::declval< typename ValueSet::value_t >()))
 The type of the add member function in valuesets. More...
 
template<typename ValueSet >
using vcsn::has_add_mem_fn = detail::detect< ValueSet, add_mem_fn_t >
 Whether ValueSet features an add() member function. More...
 

Functions

template<Automaton Aut1, Automaton Aut2>
Aut1 & vcsn::multiply_here (Aut1 &res, const Aut2 &b, deterministic_tag)
 Append automaton b to res. More...
 
template<Automaton Aut1, Automaton Aut2>
Aut1 & vcsn::multiply_here (Aut1 &res, const Aut2 &b, general_tag)
 Append automaton b to res for non standard automata. More...
 
template<Automaton Aut1, Automaton Aut2>
Aut1 & vcsn::multiply_here (Aut1 &res, const Aut2 &b, standard_tag={})
 Append automaton b to res. More...
 
template<Automaton Aut1, Automaton Aut2, typename Tag = general_tag>
auto vcsn::multiply (const Aut1 &lhs, const Aut2 &rhs, Tag tag={}) -> decltype(lhs->null_state(), rhs->null_state(), detail::make_join_automaton(tag, lhs, rhs))
 Concatenate two automata, general case. More...
 
template<Automaton Lhs, Automaton Rhs, typename String >
automaton vcsn::dyn::detail::multiply (const automaton &lhs, const automaton &rhs, const std::string &algo)
 Bridge. More...
 
template<Automaton Aut, typename Tag = general_tag>
auto vcsn::multiply (const Aut &aut, to exp, Tag tag={}) -> decltype(aut->null_state(), detail::make_join_automaton(tag, aut))
 Repeated concatenation of an automaton. More...
 
template<Automaton Aut, typename Int1 , typename Int2 , typename String >
automaton vcsn::dyn::detail::multiply_repeated (const automaton &a, int min, int max, const std::string &algo)
 Bridge (multiply). More...
 
template<typename ValueSet >
ValueSet::value_t vcsn::multiply (const ValueSet &vs, const typename ValueSet::value_t &lhs, const typename ValueSet::value_t &rhs)
 Product (concatenation) of expressions/labels/polynomials/weights. More...
 
template<typename ExpSetLhs , typename ExpSetRhs >
expression vcsn::dyn::detail::multiply_expression (const expression &lhs, const expression &rhs)
 Bridge (multiply). More...
 
template<typename ExpSetLhs , typename ExpSetRhs >
expression vcsn::dyn::detail::concatenate_expression (const expression &lhs, const expression &rhs)
 Bridge (concatenate). More...
 
template<typename ValueSet >
auto vcsn::multiply (const ValueSet &vs, const typename ValueSet::value_t &v, const to &exp) -> std::enable_if_t<!has_add_mem_fn< ValueSet >
 Repeated multiplication of values that cannot be added. More...
 
return vcsn::detail::static_if< detail::has_power_mem_fn< ValueSet >{}> ([](const auto &vs, const auto &v, auto n){return vs.power(v, n);}, [](const auto &vs, const auto &v, auto n){auto res=vs.one();if(!vs.is_one(v)) while(n--) res=vs.mul(res, v);return res;})(vs
 
 vcsn::if (exp.max==-1)
 
 vcsn::if (exp.min< exp.max)
 
template<typename ExpSet , typename Int1 , typename Int2 >
expression vcsn::dyn::detail::multiply_expression_repeated (const expression &re, int min, int max)
 Bridge (multiply). More...
 
template<typename LabelSetLhs , typename LabelSetRhs >
label vcsn::dyn::detail::multiply_label (const label &lhs, const label &rhs)
 Bridge (multiply). More...
 
template<typename LabelSet , typename Int >
label vcsn::dyn::detail::multiply_label_repeated (const label &re, int exp)
 Bridge (multiply). More...
 
template<typename PolynomialSetLhs , typename PolynomialSetRhs >
polynomial vcsn::dyn::detail::multiply_polynomial (const polynomial &lhs, const polynomial &rhs)
 Bridge (multiply). More...
 
template<typename WeightSetLhs , typename WeightSetRhs >
weight vcsn::dyn::detail::multiply_weight (const weight &lhs, const weight &rhs)
 Bridge (multiply). More...
 
template<typename WeightSet , typename Int1 , typename Int2 >
weight vcsn::dyn::detail::multiply_weight_repeated (const weight &wgt, int min, int max)
 Bridge (multiply). More...
 

Variables

return vcsn::v
 
return exp vcsn::min
 
 vcsn::else
 
return vcsn::res