Vcsn  2.4
Be Rational
join-automata.hh
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace vcsn
6 {
7  namespace detail
8  {
9 
11  template <Automaton... Auts>
12  auto
13  join_automata(Auts&&... auts)
14  // SFINAE
15  -> decltype(pass(auts->null_state()...),
16  make_mutable_automaton(join(auts->context()...)))
17  {
18  return make_mutable_automaton(join(auts->context()...));
19  }
20 
22  template <Automaton... Auts>
23  using join_automata_t = decltype(join_automata<std::declval<Auts>()...>);
24 
25 
27  template <Automaton... Auts>
28  auto
29  nullable_join_context(Auts&&... auts)
30  -> decltype(pass(auts->null_state()...),
31  make_nullableset_context(join(auts->context()...)))
32  {
33  return make_nullableset_context(join(auts->context()...));
34  }
35 
37  template <Automaton... Auts>
38  auto
39  nullable_join_automata(Auts&&... auts)
40  -> decltype(pass(auts->null_state()...),
42  {
44  }
45 
47  template <Automaton... Auts>
48  auto
49  meet_automata(Auts&&... auts)
50  -> decltype(pass(auts->null_state()...),
51  make_mutable_automaton(meet(auts->context()...)))
52  {
53  return make_mutable_automaton(meet(auts->context()...));
54  }
55  }
56 }
auto meet_automata(Auts &&...auts) -> decltype(pass(auts->null_state()...), make_mutable_automaton(meet(auts->context()...)))
An automaton whose type is the meet between those of auts.
auto nullable_join_automata(Auts &&...auts) -> decltype(pass(auts->null_state()...), make_mutable_automaton(nullable_join_context(auts...)))
An automaton whose type is the nullable join between those of auts.
decltype(join_automata< std::declval< Auts >()... >) join_automata_t
The type of the join between automata of type Auts.
Ignore its arguments.
Definition: raise.hh:18
#define Automaton
Definition: automaton.hh:23
mutable_automaton< Context > make_mutable_automaton(const Context &ctx)
Definition: a-star.hh:8
auto join_automata(Auts &&...auts) -> decltype(pass(auts->null_state()...), make_mutable_automaton(join(auts->context()...)))
An automaton whose type is the join between those of auts.
auto nullable_join_context(Auts &&...auts) -> decltype(pass(auts->null_state()...), make_nullableset_context(join(auts->context()...)))
The nullable context of the join between parameters' context.
auto join(const ValueSet &vs) -> ValueSet
The join of a single valueset.
Definition: join.hh:44
nullableset_context_t< context< LabelSet, WeightSet > > make_nullableset_context(const context< LabelSet, WeightSet > &ctx)
The nullableset context of a context.
Definition: labelset.hh:165
auto meet(const expressionset< Ctx1 > &a, const expressionset< Ctx2 > &b) -> expressionset< meet_t< Ctx1, Ctx2 >>
The meet of two expressionsets.