![]() |
Vcsn
2.8
Be Rational
|
A functor for three-way comparison between two expressions. More...
#include <compare.hh>
Classes | |
struct | visit_tuple |
Public Types | |
using | expressionset_t = ExpSet |
using | self_t = compare |
using | context_t = context_t_of< expressionset_t > |
using | labelset_t = labelset_t_of< context_t > |
using | weightset_t = weightset_t_of< context_t > |
using | weight_t = weight_t_of< context_t > |
using | expression_t = typename expressionset_t::value_t |
using | super_t = typename expressionset_t::const_visitor |
using | node_t = typename super_t::node_t |
using | inner_t = typename super_t::inner_t |
template<rat::exp::type_t Type> | |
using | unary_t = typename super_t::template unary_t< Type > |
template<rat::exp::type_t Type> | |
using | variadic_t = typename super_t::template variadic_t< Type > |
template<rat::exp::type_t Type> | |
using | weight_node_t = typename super_t::template weight_node_t< Type > |
Public Member Functions | |
int | operator() (expression_t lhs, expression_t rhs) |
Whether lhs < rhs. More... | |
Private Types | |
using | tuple_t = typename super_t::tuple_t |
Private Member Functions | |
VCSN_RAT_VISIT (add, lhs) | |
VCSN_RAT_VISIT (atom, lhs) | |
VCSN_RAT_VISIT (complement, lhs) | |
VCSN_RAT_VISIT (compose, lhs) | |
VCSN_RAT_VISIT (conjunction, lhs) | |
VCSN_RAT_VISIT (infiltrate, lhs) | |
VCSN_RAT_VISIT (ldivide, lhs) | |
VCSN_RAT_VISIT (lweight, lhs) | |
VCSN_RAT_VISIT (one, lhs) | |
VCSN_RAT_VISIT (mul, lhs) | |
VCSN_RAT_VISIT (name, lhs) | |
VCSN_RAT_VISIT (rweight, lhs) | |
VCSN_RAT_VISIT (shuffle, lhs) | |
VCSN_RAT_VISIT (star, lhs) | |
VCSN_RAT_VISIT (transposition, lhs) | |
VCSN_RAT_VISIT (zero, lhs) | |
void | visit (const tuple_t &v, std::true_type) override |
int | cmp_ (const zero_t &, const zero_t &) |
int | cmp_ (const one_t &, const one_t &) |
int | cmp_ (const atom_t &lhs, const atom_t &rhs) |
int | cmp_ (const name_t &lhs, const name_t &rhs) |
template<rat::exp::type_t Type> | |
int | cmp_ (const variadic_t< Type > &lhs, const variadic_t< Type > &rhs) |
template<rat::exp::type_t Type> | |
int | cmp_ (const unary_t< Type > &lhs, const unary_t< Type > &rhs) |
template<rat::exp::type_t Type> | |
int | cmp_ (const weight_node_t< Type > &lhs, const weight_node_t< Type > &rhs) |
Private Attributes | |
expression_t | rhs_ |
The right-hand side expression with which the current node is compared. More... | |
int | res_ |
The current result. More... | |
A functor for three-way comparison between two expressions.
Implements the shortlex order.
Definition at line 18 of file compare.hh.
using vcsn::rat::compare< ExpSet >::context_t = context_t_of<expressionset_t> |
Definition at line 24 of file compare.hh.
using vcsn::rat::compare< ExpSet >::expression_t = typename expressionset_t::value_t |
Definition at line 28 of file compare.hh.
using vcsn::rat::compare< ExpSet >::expressionset_t = ExpSet |
Definition at line 22 of file compare.hh.
using vcsn::rat::compare< ExpSet >::inner_t = typename super_t::inner_t |
Definition at line 31 of file compare.hh.
using vcsn::rat::compare< ExpSet >::labelset_t = labelset_t_of<context_t> |
Definition at line 25 of file compare.hh.
using vcsn::rat::compare< ExpSet >::node_t = typename super_t::node_t |
Definition at line 30 of file compare.hh.
using vcsn::rat::compare< ExpSet >::self_t = compare |
Definition at line 23 of file compare.hh.
using vcsn::rat::compare< ExpSet >::super_t = typename expressionset_t::const_visitor |
Definition at line 29 of file compare.hh.
|
private |
Definition at line 96 of file compare.hh.
using vcsn::rat::compare< ExpSet >::unary_t = typename super_t::template unary_t<Type> |
Definition at line 33 of file compare.hh.
using vcsn::rat::compare< ExpSet >::variadic_t = typename super_t::template variadic_t<Type> |
Definition at line 35 of file compare.hh.
using vcsn::rat::compare< ExpSet >::weight_node_t = typename super_t::template weight_node_t<Type> |
Definition at line 37 of file compare.hh.
using vcsn::rat::compare< ExpSet >::weight_t = weight_t_of<context_t> |
Definition at line 27 of file compare.hh.
using vcsn::rat::compare< ExpSet >::weightset_t = weightset_t_of<context_t> |
Definition at line 26 of file compare.hh.
|
inlineprivate |
Definition at line 132 of file compare.hh.
|
inlineprivate |
Definition at line 137 of file compare.hh.
|
inlineprivate |
Definition at line 142 of file compare.hh.
References vcsn::compare().
|
inlineprivate |
Definition at line 147 of file compare.hh.
References vcsn::res.
|
inlineprivate |
Definition at line 156 of file compare.hh.
References vcsn::detail::lexicographical_cmp(), and vcsn::res.
|
inlineprivate |
Definition at line 166 of file compare.hh.
|
inlineprivate |
Definition at line 172 of file compare.hh.
References vcsn::compare(), and vcsn::res.
|
inline |
Whether lhs < rhs.
Not just the entry point, it's also called at each recursion level. In particular, that's where size and node types are considered, routines below handle the case of nodes of same sizes and same type.
Definition at line 45 of file compare.hh.
References vcsn::res, vcsn::rat::compare< ExpSet >::res_, and vcsn::rat::compare< ExpSet >::rhs_.
|
inlineprivate |
Definition at line 78 of file compare.hh.
|
inlineprivate |
Definition at line 79 of file compare.hh.
|
inlineprivate |
Definition at line 80 of file compare.hh.
|
inlineprivate |
Definition at line 81 of file compare.hh.
|
inlineprivate |
Definition at line 82 of file compare.hh.
|
inlineprivate |
Definition at line 83 of file compare.hh.
|
inlineprivate |
Definition at line 84 of file compare.hh.
|
inlineprivate |
Definition at line 85 of file compare.hh.
|
inlineprivate |
Definition at line 86 of file compare.hh.
|
inlineprivate |
Definition at line 87 of file compare.hh.
|
inlineprivate |
Definition at line 88 of file compare.hh.
|
inlineprivate |
Definition at line 89 of file compare.hh.
|
inlineprivate |
Definition at line 90 of file compare.hh.
|
inlineprivate |
Definition at line 91 of file compare.hh.
|
inlineprivate |
Definition at line 92 of file compare.hh.
|
inlineprivate |
Definition at line 93 of file compare.hh.
|
inlineoverrideprivate |
Definition at line 118 of file compare.hh.
References vcsn::rat::compare< ExpSet >::res_, and vcsn::v.
|
private |
The current result.
Definition at line 186 of file compare.hh.
Referenced by vcsn::rat::compare< ExpSet >::operator()(), and vcsn::rat::compare< ExpSet >::visit().
|
private |
The right-hand side expression with which the current node is compared.
Updated by the recursion.
Definition at line 184 of file compare.hh.
Referenced by vcsn::rat::compare< ExpSet >::operator()(), and vcsn::rat::compare< ExpSet >::visit_tuple< typename >::operator()().