Vcsn  2.8
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, 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 identities are on. More...
 
bool is_distributive () const
 Whether distributive identities are on. More...
 
bool is_linear () const
 Whether linear identities are on. More...
 
bool is_trivial () const
 Whether trivial identities are on. 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 20 of file identities.hh.

Member Typedef Documentation

◆ self_t

Definition at line 23 of file identities.hh.

Member Enumeration Documentation

◆ ids_t

Enumerator
none 

Strictly obey to the syntax.

trivial 

Trivial identities only.

associative 

Trivial, plus associativity of add and product.

linear 

Associative plus commutativity, and "idempotence" for add.

distributive 

Linear plus distribution. Used for series identities.

agressive 

Distributive plus optimizations.

deflt 

The default value.

Definition at line 25 of file identities.hh.

Constructor & Destructor Documentation

◆ identities() [1/3]

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

Definition at line 50 of file identities.hh.

Referenced by vcsn::dyn::detail::identities_of().

◆ identities() [2/3]

vcsn::rat::identities::identities ( const std::string &  i)

Build from a string.

Definition at line 13 of file identities.cc.

References agressive, associative, deflt, distributive, ids_, linear, none, and trivial.

◆ identities() [3/3]

vcsn::rat::identities::identities ( const char cp)

Build from a literal string.

Definition at line 34 of file identities.cc.

Member Function Documentation

◆ ids()

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

Definition at line 60 of file identities.hh.

References ids_.

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

◆ is_agressive()

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

Whether agressive optimizations are on.

Definition at line 66 of file identities.hh.

References agressive, and ids_.

Referenced by vcsn::rat::expressionset_impl< Context >::star(), and vcsn::rat::expressionset_impl< Context >::transposition().

◆ is_associative()

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

Whether associative identities are on.

Definition at line 72 of file identities.hh.

References associative, and ids_.

Referenced by vcsn::rat::expressionset_impl< Context >::power().

◆ is_distributive()

◆ is_linear()

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

◆ is_trivial()

◆ operator bool()

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

Whether not none.

Definition at line 96 of file identities.hh.

References ids_, and none.

◆ operator!=()

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

Definition at line 111 of file identities.hh.

References operator==().

Here is the call graph for this function:

◆ operator<()

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

Definition at line 101 of file identities.hh.

References ids_.

◆ operator==()

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

Definition at line 106 of file identities.hh.

References ids_.

Referenced by operator!=().

Member Data Documentation

◆ ids_


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