Vcsn  2.8
Be Rational
infiltrate-expression.hh
Go to the documentation of this file.
1 #pragma once
2 
4 #include <vcsn/ctx/context.hh>
5 #include <vcsn/ctx/traits.hh>
6 #include <vcsn/dyn/value.hh>
7 
8 namespace vcsn
9 {
10  /*----------------------------.
11  | infiltrate(value, value). |
12  `----------------------------*/
13 
15  template <typename ValueSet>
16  typename ValueSet::value_t
17  infiltrate(const ValueSet& vs,
18  const typename ValueSet::value_t& lhs,
19  const typename ValueSet::value_t& rhs)
20  {
21  return vs.infiltrate(lhs, rhs);
22  }
23 
24 
25  namespace dyn
26  {
27  namespace detail
28  {
29  template <typename ValueSetLhs, typename ValueSetRhs,
30  typename Value>
31  Value
32  infiltrate_value(const Value& lhs, const Value& rhs)
33  {
34  auto join_elts = join<ValueSetLhs, ValueSetRhs>(lhs, rhs);
35  return {std::get<0>(join_elts),
36  ::vcsn::infiltrate(std::get<0>(join_elts),
37  std::get<1>(join_elts),
38  std::get<2>(join_elts))};
39  }
40  }
41  }
42 
43 
44  /*--------------------------------------.
45  | infiltrate(expression, expression). |
46  `--------------------------------------*/
47 
48  namespace dyn
49  {
50  namespace detail
51  {
53  template <typename ExpSetLhs, typename ExpSetRhs>
56  {
57  return infiltrate_value<ExpSetLhs, ExpSetRhs>(lhs, rhs);
58  }
59  }
60  }
61 
62  /*--------------------------------------.
63  | infiltrate(polynomial, polynomial). |
64  `--------------------------------------*/
65 
66  namespace dyn
67  {
68  namespace detail
69  {
71  template <typename SetLhs, typename SetRhs>
74  {
75  return infiltrate_value<SetLhs, SetRhs>(lhs, rhs);
76  }
77  }
78  }
79 }
Value infiltrate_value(const Value &lhs, const Value &rhs)
auto infiltrate(const A1 &a1, const A2 &a2) -> tuple_automaton< decltype(join_automata(a1, a2)), A1, A2 >
The (accessible part of the) infiltration product.
Definition: conjunction.hh:827
expression infiltrate_expression(const expression &lhs, const expression &rhs)
Bridge (infiltrate).
A dyn Value/ValueSet.
Definition: fwd.hh:29
Definition: a-star.hh:8
value_impl< detail::expression_tag > expression
Definition: fwd.hh:31
polynomial infiltrate_polynomial(const polynomial &lhs, const polynomial &rhs)
Bridge (infiltrate).