Vcsn  2.8
Be Rational
compare.hh
Go to the documentation of this file.
1 #pragma once
2 
3 namespace vcsn
4 {
5  namespace dyn
6  {
7  namespace detail
8  {
9  template <typename ValueSet1, typename ValueSet2,
10  typename DynValue>
11  int
12  compare_bridge(const DynValue& lhs, const DynValue& rhs)
13  {
14  auto join_elts = join<ValueSet1, ValueSet2>(lhs, rhs);
15  return std::get<0>(join_elts).compare(std::get<1>(join_elts),
16  std::get<2>(join_elts));
17  }
18 
20  template <typename ExpSet1, typename ExpSet2>
21  int
22  compare_expression(const expression& lhs, const expression& rhs)
23  {
24  return compare_bridge<ExpSet1, ExpSet2>(lhs, rhs);
25  }
26 
28  template <typename LabelSet1, typename LabelSet2>
29  int
30  compare_label(const label& lhs, const label& rhs)
31  {
32  return compare_bridge<LabelSet1, LabelSet2>(lhs, rhs);
33  }
34 
36  template <typename PolynomialSet1, typename PolynomialSet2>
37  int
38  compare_polynomial(const polynomial& lhs, const polynomial& rhs)
39  {
40  return compare_bridge<PolynomialSet1, PolynomialSet2>(lhs, rhs);
41  }
42 
44  template <typename WeightSet1, typename WeightSet2>
45  int
46  compare_weight(const weight& lhs, const weight& rhs)
47  {
48  return compare_bridge<WeightSet1, WeightSet2>(lhs, rhs);
49  }
50  }
51  }
52 } // namespace vcsn
int compare_expression(const expression &lhs, const expression &rhs)
Bridge (compare).
Definition: compare.hh:22
int compare(const automaton &lhs, const automaton &rhs)
Bridge (compare).
A dyn Value/ValueSet.
Definition: fwd.hh:29
Definition: a-star.hh:8
int compare_weight(const weight &lhs, const weight &rhs)
Bridge (compare).
Definition: compare.hh:46
int compare_bridge(const DynValue &lhs, const DynValue &rhs)
Definition: compare.hh:12
value_impl< detail::expression_tag > expression
Definition: fwd.hh:31
int compare_label(const label &lhs, const label &rhs)
Bridge (compare).
Definition: compare.hh:30
int compare_polynomial(const polynomial &lhs, const polynomial &rhs)
Bridge (compare).
Definition: compare.hh:38