![]() |
Vcsn
2.5
Be Rational
|
An expressionset can implement several different sets of identities on expressions. More...
#include <identities.hh>
Public Types | |
enum | ids_t { none, trivial, associative, linear, distributive, agressive, deflt = linear } |
using | self_t = identities |
Public Member Functions | |
identities (ids_t id=deflt) | |
identities (const std::string &i) | |
Build from a string. More... | |
identities (const char *cp) | |
Build from a literal string. More... | |
ids_t | ids () const |
bool | is_agressive () const |
Whether agressive optimizations are on. More... | |
bool | is_associative () const |
Whether associative. More... | |
bool | is_distributive () const |
Whether distributive. More... | |
bool | is_linear () const |
Whether linear. More... | |
operator bool () const | |
Whether not none. More... | |
bool | operator< (self_t that) const |
bool | operator== (self_t that) const |
bool | operator!= (self_t that) const |
Private Attributes | |
ids_t | ids_ |
An expressionset can implement several different sets of identities on expressions.
This type represents one of those sets.
Could have been a simple enum class, but having a constructor is helping to select the default identities other than the first one.
Definition at line 20 of file identities.hh.
Definition at line 23 of file identities.hh.
Definition at line 25 of file identities.hh.
Definition at line 50 of file identities.hh.
Referenced by vcsn::dyn::detail::identities_of().
vcsn::rat::identities::identities | ( | const std::string & | i | ) |
Build from a string.
Definition at line 17 of file identities.cc.
References agressive, associative, deflt, distributive, ids_, linear, none, and trivial.
vcsn::rat::identities::identities | ( | const char * | cp | ) |
Build from a literal string.
Definition at line 38 of file identities.cc.
|
inline |
|
inline |
Whether agressive optimizations are on.
Definition at line 66 of file identities.hh.
|
inline |
|
inline |
Whether distributive.
Definition at line 78 of file identities.hh.
References distributive, and ids_.
Referenced by vcsn::rat::expressionset_impl< Context >::expressionset_impl(), and vcsn::rat::expressionset_impl< Context >::print_set().
|
inline |
Whether linear.
Definition at line 84 of file identities.hh.
Referenced by vcsn::rat::expressionset_impl< Context >::rweight().
|
inline |
|
inline |
Definition at line 105 of file identities.hh.
References operator==().
|
inline |
Definition at line 95 of file identities.hh.
References ids_.
|
inline |
|
private |
Definition at line 111 of file identities.hh.
Referenced by vcsn::rat::expressionset_impl< Context >::conv(), identities(), ids(), is_agressive(), is_associative(), is_distributive(), is_linear(), operator bool(), operator<(), and operator==().