Vaucanson 1.4
Public Member Functions | Static Public Member Functions | Protected Attributes
exp< LetterT, WeightT > Class Template Reference

Implementation of rational expression. More...

Inheritance diagram for exp< LetterT, WeightT >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ~exp ()
 Destructor.
expstar ()
 Star an expression.
expswap (exp &otether)
 Swap with another expression.
void accept (ConstNodeVisitor< monoid_elt_value_t, semiring_elt_value_t > &v) const
 Facility to accept a visitor on the root node.
size_t depth () const
 Compute the depth of the expression.
size_t star_height () const
 Compute the star height (h) of the expression (E).
size_t length () const
 Compute the length of the expression, i.e.
exp clone () const
 Copy the expression.
 exp ()
 Constructors.
 exp (node_t *p)
 Constructors.
 exp (const node_t *p)
 Constructors.
 exp (const exp &other)
 Constructors.
expoperator= (const exp &other)
 Classical operations.
expoperator+= (const exp &other)
 Classical operations.
expoperator*= (const exp &other)
 Classical operations.
node_t *& base ()
 Get the root node of the expression.
node_t *const & base () const
 Get the root node of the expression.
bool operator== (const exp &other) const
 Comparisons operators.
bool operator!= (const exp &other) const
 Comparisons operators.
bool operator< (const exp &other) const
 Comparisons operators.

Static Public Member Functions

static bool starable ()
 Always returns true, since a expression is always starable.
static exp one ()
 Basic expressions.
static exp zero ()
 Basic expressions.
static exp constant (const monoid_elt_value_t &l)
 Basic expressions.

Protected Attributes

node_t * base_
 Root node.

Detailed Description

template<typename LetterT, typename WeightT>
class vcsn::rat::exp< LetterT, WeightT >

Implementation of rational expression.

Definition at line 29 of file exp.hh.


Member Function Documentation

size_t star_height ( ) const

Compute the star height (h) of the expression (E).

Definition: if E=0 or E=1 or E='letter' then 0 if E=E1 + E2 or E=E1.E2 then max(h(E1), h(E2)) if E=F* then 1 + h(F)

Definition at line 115 of file exp.hxx.

size_t length ( ) const

Compute the length of the expression, i.e.

the number of letters used in the expression.

Definition at line 123 of file exp.hxx.