Vcsn  2.2
Be Rational
vcsn::rat::less< ExpSet > Class Template Reference

A functor to check whether one rational expression is (strictly) less than another one. More...

#include <less.hh>

Inheritance diagram for vcsn::rat::less< ExpSet >:
Collaboration diagram for vcsn::rat::less< ExpSet >:

Classes

struct  visit_tuple
 
struct  visit_tuple< false, Dummy >
 

Public Types

using expressionset_t = ExpSet
 
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

bool 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 (atom, lhs)
 
 VCSN_RAT_VISIT (complement, lhs)
 
 VCSN_RAT_VISIT (conjunction, lhs)
 
 VCSN_RAT_VISIT (infiltration, lhs)
 
 VCSN_RAT_VISIT (ldiv, lhs)
 
 VCSN_RAT_VISIT (lweight, lhs)
 
 VCSN_RAT_VISIT (one, lhs)
 
 VCSN_RAT_VISIT (prod, lhs)
 
 VCSN_RAT_VISIT (rweight, lhs)
 
 VCSN_RAT_VISIT (shuffle, lhs)
 
 VCSN_RAT_VISIT (star, lhs)
 
 VCSN_RAT_VISIT (sum, lhs)
 
 VCSN_RAT_VISIT (transposition, lhs)
 
 VCSN_RAT_VISIT (zero, lhs)
 
void visit (const tuple_t &v, std::true_type) override
 
bool less_ (const zero_t &, const zero_t &)
 
bool less_ (const one_t &, const one_t &)
 
bool less_ (const atom_t &lhs, const atom_t &rhs)
 
template<rat::exp::type_t Type>
bool less_ (const variadic_t< Type > &lhs, const variadic_t< Type > &rhs)
 
template<rat::exp::type_t Type>
bool less_ (const unary_t< Type > &lhs, const unary_t< Type > &rhs)
 
template<rat::exp::type_t Type>
bool less_ (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...
 
bool res_
 The current result. More...
 

Detailed Description

template<typename ExpSet>
class vcsn::rat::less< ExpSet >

A functor to check whether one rational expression is (strictly) less than another one.

Implements the shortlex order.

Definition at line 21 of file less.hh.

Member Typedef Documentation

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::context_t = context_t_of<expressionset_t>

Definition at line 26 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::expression_t = typename expressionset_t::value_t

Definition at line 30 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::expressionset_t = ExpSet

Definition at line 25 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::inner_t = typename super_t::inner_t

Definition at line 33 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::labelset_t = labelset_t_of<context_t>

Definition at line 27 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::node_t = typename super_t::node_t

Definition at line 32 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::super_t = typename expressionset_t::const_visitor

Definition at line 31 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::tuple_t = typename super_t::tuple_t
private

Definition at line 100 of file less.hh.

template<typename ExpSet >
template<rat::exp::type_t Type>
using vcsn::rat::less< ExpSet >::unary_t = typename super_t::template unary_t<Type>

Definition at line 35 of file less.hh.

template<typename ExpSet >
template<rat::exp::type_t Type>
using vcsn::rat::less< ExpSet >::variadic_t = typename super_t::template variadic_t<Type>

Definition at line 37 of file less.hh.

template<typename ExpSet >
template<rat::exp::type_t Type>
using vcsn::rat::less< ExpSet >::weight_node_t = typename super_t::template weight_node_t<Type>

Definition at line 39 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::weight_t = weight_t_of<context_t>

Definition at line 29 of file less.hh.

template<typename ExpSet >
using vcsn::rat::less< ExpSet >::weightset_t = weightset_t_of<context_t>

Definition at line 28 of file less.hh.

Member Function Documentation

template<typename ExpSet >
bool vcsn::rat::less< ExpSet >::less_ ( const zero_t &  ,
const zero_t &   
)
inlineprivate

Definition at line 142 of file less.hh.

template<typename ExpSet >
bool vcsn::rat::less< ExpSet >::less_ ( const one_t &  ,
const one_t &   
)
inlineprivate

Definition at line 147 of file less.hh.

template<typename ExpSet >
bool vcsn::rat::less< ExpSet >::less_ ( const atom_t &  lhs,
const atom_t &  rhs 
)
inlineprivate

Definition at line 152 of file less.hh.

template<typename ExpSet >
template<rat::exp::type_t Type>
bool vcsn::rat::less< ExpSet >::less_ ( const variadic_t< Type > &  lhs,
const variadic_t< Type > &  rhs 
)
inlineprivate

Definition at line 158 of file less.hh.

References vcsn::detail::rs.

template<typename ExpSet >
template<rat::exp::type_t Type>
bool vcsn::rat::less< ExpSet >::less_ ( const unary_t< Type > &  lhs,
const unary_t< Type > &  rhs 
)
inlineprivate

Definition at line 173 of file less.hh.

template<typename ExpSet >
template<rat::exp::type_t Type>
bool vcsn::rat::less< ExpSet >::less_ ( const weight_node_t< Type > &  lhs,
const weight_node_t< Type > &  rhs 
)
inlineprivate

Definition at line 179 of file less.hh.

template<typename ExpSet >
bool vcsn::rat::less< ExpSet >::operator() ( expression_t  lhs,
expression_t  rhs 
)
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 47 of file less.hh.

References vcsn::rat::less< ExpSet >::res_, and vcsn::rat::less< ExpSet >::rhs_.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( atom  ,
lhs   
)
inlineprivate

Definition at line 84 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( complement  ,
lhs   
)
inlineprivate

Definition at line 85 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( conjunction  ,
lhs   
)
inlineprivate

Definition at line 86 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( infiltration  ,
lhs   
)
inlineprivate

Definition at line 87 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( ldiv  ,
lhs   
)
inlineprivate

Definition at line 88 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( lweight  ,
lhs   
)
inlineprivate

Definition at line 89 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( one  ,
lhs   
)
inlineprivate

Definition at line 90 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( prod  ,
lhs   
)
inlineprivate

Definition at line 91 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( rweight  ,
lhs   
)
inlineprivate

Definition at line 92 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( shuffle  ,
lhs   
)
inlineprivate

Definition at line 93 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( star  ,
lhs   
)
inlineprivate

Definition at line 94 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( sum  ,
lhs   
)
inlineprivate

Definition at line 95 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( transposition  ,
lhs   
)
inlineprivate

Definition at line 96 of file less.hh.

template<typename ExpSet >
vcsn::rat::less< ExpSet >::VCSN_RAT_VISIT ( zero  ,
lhs   
)
inlineprivate

Definition at line 97 of file less.hh.

template<typename ExpSet >
void vcsn::rat::less< ExpSet >::visit ( const tuple_t v,
std::true_type   
)
inlineoverrideprivate

Definition at line 133 of file less.hh.

References vcsn::rat::less< ExpSet >::res_, and vcsn::detail::v.

Member Data Documentation

template<typename ExpSet >
bool vcsn::rat::less< ExpSet >::res_
private

The current result.

Definition at line 195 of file less.hh.

Referenced by vcsn::rat::less< ExpSet >::operator()(), and vcsn::rat::less< ExpSet >::visit().

template<typename ExpSet >
expression_t vcsn::rat::less< ExpSet >::rhs_
private

The right-hand side expression with which the current node is compared.

Updated by the recursion.

Definition at line 193 of file less.hh.

Referenced by vcsn::rat::less< ExpSet >::operator()(), and vcsn::rat::less< ExpSet >::visit_tuple< bool, Dummy >::operator()().


The documentation for this class was generated from the following file: