Vcsn  2.2
Be Rational
vcsn::rat::identities Class Reference

An expressionset can implement several different sets of identities on expressions. More...

#include <identities.hh>

Collaboration diagram for vcsn::rat::identities:

Public Types

enum  ids_t {
  none, trivial, associative, linear,
  distributive, deflt = linear
}
 
using self_t = identities
 

Public Member Functions

 identities (ids_t id=deflt)
 
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_
 

Detailed Description

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.

Member Typedef Documentation

Definition at line 24 of file identities.hh.

Member Enumeration Documentation

Enumerator
none 

Strictly obey to the syntax.

trivial 

Trivial identities only.

associative 

Trivial, plus associativity of sum and product.

linear 

Associative plus commutativity, and "idempotence" for sum.

distributive 

Traditional plus distribution. Used for series identities.

deflt 

The default value.

Definition at line 26 of file identities.hh.

Constructor & Destructor Documentation

vcsn::rat::identities::identities ( ids_t  id = deflt)
inline

Definition at line 48 of file identities.hh.

Member Function Documentation

ids_t vcsn::rat::identities::ids ( ) const
inline

Definition at line 52 of file identities.hh.

References ids_.

Referenced by vcsn::rat::to_string().

bool vcsn::rat::identities::is_associative ( ) const
inline

Whether associative.

Definition at line 58 of file identities.hh.

References associative, and ids_.

bool vcsn::rat::identities::is_distributive ( ) const
inline
bool vcsn::rat::identities::is_linear ( ) const
inline

Whether linear.

Definition at line 70 of file identities.hh.

References ids_, and linear.

vcsn::rat::identities::operator bool ( ) const
inline

Whether not none.

Definition at line 76 of file identities.hh.

References ids_, and none.

bool vcsn::rat::identities::operator!= ( self_t  that) const
inline

Definition at line 91 of file identities.hh.

References operator==().

Here is the call graph for this function:

bool vcsn::rat::identities::operator< ( self_t  that) const
inline

Definition at line 81 of file identities.hh.

References ids_.

bool vcsn::rat::identities::operator== ( self_t  that) const
inline

Definition at line 86 of file identities.hh.

References ids_.

Referenced by operator!=().

Member Data Documentation

ids_t vcsn::rat::identities::ids_
private

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