exp Class Template Reference

Implementation of rational expression. More...

List of all members.

Public Types

typedef rat::Node< LetterT,
WeightT > 
node_t
typedef rat::Node< LetterT,
WeightT >::type 
type
typedef rat::Zero< LetterT,
WeightT > 
n_zero_t
typedef rat::One< LetterT,
WeightT > 
n_one_t
typedef rat::Sum< LetterT,
WeightT > 
n_sum_t
typedef rat::Product< LetterT,
WeightT > 
n_prod_t
typedef rat::Star< LetterT,
WeightT > 
n_star_t
typedef rat::Constant< LetterT,
WeightT > 
n_const_t
typedef LetterT monoid_elt_value_t
typedef WeightT semiring_elt_value_t

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.
xercesc::DOMElement * xml_tree (xercesc::DOMDocument *doc, char *node_name) const
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_tbase_
 Root node.


Detailed Description

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

Implementation of rational expression.

Definition at line 33 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 116 of file exp.hxx.

References exp::accept(), and StarHeightVisitor::get().

size_t length  )  const
 

Compute the length of the expression, i.e.

the number of letters used in the expression.

Definition at line 124 of file exp.hxx.

References exp::accept(), and LengthVisitor::get().


Generated on Sat Jul 29 17:32:49 2006 for Vaucanson by  doxygen 1.4.6