1 #ifndef VCSN_CORE_RAT_LESS_THAN_HH
2 # define VCSN_CORE_RAT_LESS_THAN_HH
15 template <
class RatExpSet>
17 :
public RatExpSet::const_visitor
25 using ratexp_t =
typename ratexpset_t::value_t;
26 using super_t =
typename ratexpset_t::const_visitor;
27 using node_t =
typename super_t::node_t;
28 using inner_t =
typename super_t::inner_t;
29 template <rat::exp::type_t Type>
31 template <rat::exp::type_t Type>
33 template <rat::exp::type_t Type>
41 size_t lhss = sizer(lhs);
42 size_t rhss = sizer(rhs);
48 else if (lhs->type() < rhs->type())
50 else if (lhs->type() > rhs->type())
65 using Type ## _t = typename super_t::Type ## _t; \
67 visit(const Type ## _t& lhs) \
69 res_ = less_than_(lhs, *down_pointer_cast<const Type ## _t>(rhs_)); \
106 template <rat::exp::type_t Type>
109 auto ls = lhs.size();
110 auto rs = rhs.size();
116 for (
size_t i = 0; i < ls; ++i)
124 template <rat::exp::type_t Type>
130 template <rat::exp::type_t Type>
148 template <
class RatExpSet>
149 typename RatExpSet::value_t
150 less_than(
const RatExpSet& rs,
const typename RatExpSet::value_t& v)
152 return rs.less_than(v);
157 #endif // !VCSN_CORE_RAT_LESS_THAN_HH
weight_t_of< context_t > weight_t
An inner node with multiple children.
bool less_than_(const zero_t &, const zero_t &)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
typename super_t::template variadic_t< Type > variadic_t
weightset_t_of< context_t > weightset_t
labelset_t_of< context_t > labelset_t
typename ratexpset_t::const_visitor super_t
typename super_t::node_t node_t
typename super_t::template weight_node_t< Type > weight_node_t
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
typename ratexpset_t::value_t ratexp_t
bool operator()(ratexp_t lhs, ratexp_t rhs)
Whether lhs < rhs.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
bool less_than_(const one_t &, const one_t &)
typename super_t::atom_t atom_t
bool less_than_(const unary_t< Type > &lhs, const unary_t< Type > &rhs)
bool less_than_(const variadic_t< Type > &lhs, const variadic_t< Type > &rhs)
typename super_t::zero_t zero_t
context_t_of< ratexpset_t > context_t
An inner node implementing a weight.
typename detail::weight_t_of_impl< base_t< ValueSet >>::type weight_t_of
typename super_t::inner_t inner_t
bool less_than_(const weight_node_t< Type > &lhs, const weight_node_t< Type > &rhs)
RatExpSet::value_t less_than(const RatExpSet &rs, const typename RatExpSet::value_t &v)
typename super_t::one_t one_t
bool less_than_(const atom_t &lhs, const atom_t &rhs)
typename super_t::template unary_t< Type > unary_t