Vcsn
2.3
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, 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_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 21 of file identities.hh.
Definition at line 24 of file identities.hh.
Definition at line 26 of file identities.hh.
Definition at line 48 of file identities.hh.
vcsn::rat::identities::identities | ( | const std::string & | i | ) |
Build from a string.
Definition at line 17 of file identities.cc.
References associative, deflt, distributive, ids_, linear, none, and trivial.
vcsn::rat::identities::identities | ( | const char * | cp | ) |
Build from a literal string.
Definition at line 37 of file identities.cc.
|
inline |
|
inline |
|
inline |
Whether distributive.
Definition at line 70 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 |
|
inline |
|
inline |
Definition at line 97 of file identities.hh.
References operator==().
|
inline |
Definition at line 87 of file identities.hh.
References ids_.
|
inline |
|
private |
Definition at line 103 of file identities.hh.
Referenced by identities(), ids(), is_associative(), is_distributive(), is_linear(), operator bool(), operator<(), and operator==().