Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Public Member Functions
rte::FormalRTESubstitution< SymbolType > Class Template Reference

Represents the concatenation operator in the regular tree expression. The node must have exactly two children. More...

#include <FormalRTESubstitution.h>

Inheritance diagram for rte::FormalRTESubstitution< SymbolType >:
[legend]
Collaboration diagram for rte::FormalRTESubstitution< SymbolType >:
[legend]

Public Member Functions

 FormalRTESubstitution (FormalRTEElement< SymbolType > &&left, FormalRTEElement< SymbolType > &&right, FormalRTESymbolSubst< SymbolType > substitutionSymbol)
 Creates a new instance of the substitution node with explicit tree to substitute in, tree to substitue by and a symbol representing place of substitution. More...
 
 FormalRTESubstitution (const FormalRTEElement< SymbolType > &left, const FormalRTEElement< SymbolType > &right, FormalRTESymbolSubst< SymbolType > substitutionSymbol)
 Creates a new instance of the substitution node with explicit tree to substitute in, tree to substitue by and a symbol representing place of substitution. More...
 
FormalRTESubstitution< SymbolType > * clone () const &override
 < SymbolType >::clone ( ) const & More...
 
FormalRTESubstitution< SymbolType > * clone () &&override
 < SymbolType >::clone ( ) && More...
 
bool testSymbol (const common::ranked_symbol< SymbolType > &symbol) const override
 < SymbolType >::testSymbol ( const common::ranked_symbol < SymbolType > & ) const More...
 
void computeMinimalAlphabet (ext::set< common::ranked_symbol< SymbolType > > &alphabetF, ext::set< common::ranked_symbol< SymbolType > > &alphabetK) const override
 < SymbolType >::computeMinimalAlphabet ( ext::set < common::ranked_symbol < SymbolType > > &, ext::set < common::ranked_symbol < SymbolType > > & ) const More...
 
bool checkAlphabet (const ext::set< common::ranked_symbol< SymbolType > > &alphabetF, const ext::set< common::ranked_symbol< SymbolType > > &alphabetK) const override
 < SymbolType >::checkAlphabet ( const ext::set < common::ranked_symbol < SymbolType > > &, const ext::set < common::ranked_symbol < SymbolType > > & ) const More...
 
const FormalRTEElement< SymbolType > & getLeftElement () const
 
const FormalRTEElement< SymbolType > & getRightElement () const
 
const FormalRTESymbolSubst< SymbolType > & getSubstitutionSymbol () const
 
FormalRTEElement< SymbolType > & getLeftElement ()
 
FormalRTEElement< SymbolType > & getRightElement ()
 
FormalRTESymbolSubst< SymbolType > & getSubstitutionSymbol ()
 
void setLeftElement (const FormalRTEElement< SymbolType > &element)
 
void setLeftElement (FormalRTEElement< SymbolType > &&element)
 
void setRightElement (const FormalRTEElement< SymbolType > &element)
 
void setRightElement (FormalRTEElement< SymbolType > &&element)
 
void setSubstitutionSymbol (FormalRTESymbolSubst< SymbolType > symbol)
 
std::strong_ordering operator<=> (const FormalRTEElement< SymbolType > &other) const override
 < SymbolType >::operator <=> ( const FormalRTEElement < SymbolType > & other ) const; More...
 
std::strong_ordering operator<=> (const FormalRTESubstitution< SymbolType > &) const
 
bool operator== (const FormalRTEElement< SymbolType > &other) const override
 < SymbolType >::operator == ( const FormalRTEElement < SymbolType > & other ) const; More...
 
bool operator== (const FormalRTESubstitution< SymbolType > &) const
 
void operator>> (ext::ostream &out) const override
 < FormalRTEElement < SymbolType > >::operator >> ( ext::ostream & ) const More...
 
ext::smart_ptr< FormalRTEElement< DefaultSymbolType > > normalize () &&override
 < SymbolType >::normalize ( ) && More...
 
- Public Member Functions inherited from ext::BinaryNode< FormalRTEElement< SymbolType > >
 BinaryNode (const FormalRTEElement< SymbolType > &l, const FormalRTEElement< SymbolType > &r)
 Constructor of the class accepting the two child nodes. More...
 
 BinaryNode (FormalRTEElement< SymbolType > &&l, FormalRTEElement< SymbolType > &&r)
 Constructor of the class accepting the two child nodes. More...
 
FormalRTEElement< SymbolType > & getLeft ()
 Getter of the first child of the node. More...
 
const FormalRTEElement< SymbolType > & getLeft () const
 Getter of the first child of the node. More...
 
void setLeft (const FormalRTEElement< SymbolType > &l)
 Setter of the first child of the node. More...
 
void setLeft (FormalRTEElement< SymbolType > &&l)
 Setter of the first child of the node. More...
 
FormalRTEElement< SymbolType > & getRight ()
 Getter of the second child of the node. More...
 
const FormalRTEElement< SymbolType > & getRight () const
 Getter of the second child of the node. More...
 
void setRight (const FormalRTEElement< SymbolType > &r)
 Setter of the second child of the node. More...
 
void setRight (FormalRTEElement< SymbolType > &&r)
 Setter of the second child of the node. More...
 
- Public Member Functions inherited from ext::AnyaryNode< Data, arity, Base >
 AnyaryNode (ext::ptr_array< Data, arity > c)
 Constructor based on array of child nodes. More...
 
 ~AnyaryNode () noexcept override=default
 Destructor of the class. More...
 
 AnyaryNode (const AnyaryNode &other)
 Copy constructor. More...
 
 AnyaryNode (AnyaryNode &&other) noexcept
 Move constructor. More...
 
AnyaryNodeoperator= (const AnyaryNode &other)
 Copy operator of assignment. More...
 
AnyaryNodeoperator= (AnyaryNode &&other) noexcept
 move operator of assignment. More...
 
const ext::ptr_array< Data, arity > & getChildren () &
 Getter of the child nodes. More...
 
const ext::ptr_array< Data, arity > & getChildren () const &
 Getter of the child nodes. More...
 
ext::ptr_array< Data, arity > && getChildren () &&
 Getter of the child nodes. More...
 
template<size_t N>
const Data & getChild () const
 Getter of the child node based on compile time index. More...
 
template<size_t N>
Data & getChild ()
 Getter of the child node based on compile time index. More...
 
void setChildren (ext::ptr_array< Data, arity > c)
 Setter of the child nodes. More...
 
template<size_t N>
void setChild (const Data &d)
 Setter of the child node based on compile time index. More...
 
template<size_t N>
void setChild (Data &&d)
 Setter of the child node based on compile time index. More...
 
ext::ptr_array< Data, arity >::iterator begin ()
 Getter of an iterator to the begining of children array. More...
 
ext::ptr_array< Data, arity >::const_iterator begin () const
 Getter of an iterator to the begining of children array. More...
 
ext::ptr_array< Data, arity >::iterator end ()
 Getter of an iterator to the end of children array. More...
 
ext::ptr_array< Data, arity >::const_iterator end () const
 Getter of an iterator to the end of children array. More...
 

Detailed Description

template<class SymbolType>
class rte::FormalRTESubstitution< SymbolType >

Represents the concatenation operator in the regular tree expression. The node must have exactly two children.

The structure is derived from BinaryNode that provides the children accessors.

The node can be visited by the FormalRTEElement < SymbolType >::Visitor

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol

Constructor & Destructor Documentation

◆ FormalRTESubstitution() [1/2]

template<class SymbolType >
rte::FormalRTESubstitution< SymbolType >::FormalRTESubstitution ( FormalRTEElement< SymbolType > &&  left,
FormalRTEElement< SymbolType > &&  right,
FormalRTESymbolSubst< SymbolType >  substitutionSymbol 
)
explicit

Creates a new instance of the substitution node with explicit tree to substitute in, tree to substitue by and a symbol representing place of substitution.

Parameters
leftthe tree to substitute in
rightthe tree to substitute by
substitutionSymbolthe symbol representing the substitution place

◆ FormalRTESubstitution() [2/2]

template<class SymbolType >
rte::FormalRTESubstitution< SymbolType >::FormalRTESubstitution ( const FormalRTEElement< SymbolType > &  left,
const FormalRTEElement< SymbolType > &  right,
FormalRTESymbolSubst< SymbolType >  substitutionSymbol 
)
explicit

Creates a new instance of the substitution node with explicit tree to substitute in, tree to substitue by and a symbol representing place of substitution.

Parameters
leftthe tree to substitute in
rightthe tree to substitute by
substitutionSymbolthe symbol representing the substitution place

Member Function Documentation

◆ checkAlphabet()

template<class SymbolType >
bool rte::FormalRTESubstitution< SymbolType >::checkAlphabet ( const ext::set< common::ranked_symbol< SymbolType > > &  alphabetF,
const ext::set< common::ranked_symbol< SymbolType > > &  alphabetK 
) const
override

< SymbolType >::checkAlphabet ( const ext::set < common::ranked_symbol < SymbolType > > &, const ext::set < common::ranked_symbol < SymbolType > > & ) const

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::checkAlphabet ( const ext::set < common::ranked_symbol < SymbolType > > &, const ext::set < common::ranked_symbol < SymbolType > > & ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clone() [1/2]

template<class SymbolType >
FormalRTESubstitution< SymbolType > * rte::FormalRTESubstitution< SymbolType >::clone ( ) &&
override

< SymbolType >::clone ( ) &&

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::clone ( ) &&

◆ clone() [2/2]

template<class SymbolType >
FormalRTESubstitution< SymbolType > * rte::FormalRTESubstitution< SymbolType >::clone ( ) const &
override

< SymbolType >::clone ( ) const &

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::clone ( ) const &

◆ computeMinimalAlphabet()

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::computeMinimalAlphabet ( ext::set< common::ranked_symbol< SymbolType > > &  alphabetF,
ext::set< common::ranked_symbol< SymbolType > > &  alphabetK 
) const
override

< SymbolType >::computeMinimalAlphabet ( ext::set < common::ranked_symbol < SymbolType > > &, ext::set < common::ranked_symbol < SymbolType > > & ) const

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::computeMinimalAlphabet ( ext::set < common::ranked_symbol < SymbolType > > &, ext::set < common::ranked_symbol < SymbolType > > & ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLeftElement() [1/2]

template<class SymbolType >
FormalRTEElement< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getLeftElement

Getter of the tree to substitute in

Returns
tree to substitute in

◆ getLeftElement() [2/2]

template<class SymbolType >
const FormalRTEElement< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getLeftElement

Getter of the tree to substitute in

Returns
tree to substitute in
Here is the caller graph for this function:

◆ getRightElement() [1/2]

template<class SymbolType >
FormalRTEElement< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getRightElement

Getter of the tree to substitute by

Returns
tree to substitute by

◆ getRightElement() [2/2]

template<class SymbolType >
const FormalRTEElement< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getRightElement

Getter of the tree to substitute by

Returns
tree to substitute by
Here is the caller graph for this function:

◆ getSubstitutionSymbol() [1/2]

template<class SymbolType >
FormalRTESymbolSubst< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getSubstitutionSymbol

Getter of the substitution symbol

Returns
the substitution symbol

◆ getSubstitutionSymbol() [2/2]

template<class SymbolType >
const FormalRTESymbolSubst< SymbolType > & rte::FormalRTESubstitution< SymbolType >::getSubstitutionSymbol

Getter of the substitution symbol

Returns
the substitution symbol
Here is the caller graph for this function:

◆ normalize()

template<class SymbolType >
ext::smart_ptr< FormalRTEElement< DefaultSymbolType > > rte::FormalRTESubstitution< SymbolType >::normalize ( ) &&
inlineoverride

< SymbolType >::normalize ( ) &&

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::normalize ( ) &&
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<=>() [1/2]

template<class SymbolType >
std::strong_ordering rte::FormalRTESubstitution< SymbolType >::operator<=> ( const FormalRTEElement< SymbolType > &  other) const
inlineoverride

< SymbolType >::operator <=> ( const FormalRTEElement < SymbolType > & other ) const;

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::operator <=> ( const FormalRTEElement < SymbolType > & other ) const;

◆ operator<=>() [2/2]

template<class SymbolType >
std::strong_ordering rte::FormalRTESubstitution< SymbolType >::operator<=> ( const FormalRTESubstitution< SymbolType > &  other) const

The three way comparison implementation

Parameters
otherthe other instance
Returns
the ordering between this object and the other.
Here is the call graph for this function:

◆ operator==() [1/2]

template<class SymbolType >
bool rte::FormalRTESubstitution< SymbolType >::operator== ( const FormalRTEElement< SymbolType > &  other) const
inlineoverride

< SymbolType >::operator == ( const FormalRTEElement < SymbolType > & other ) const;

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::operator == ( const FormalRTEElement < SymbolType > & other ) const;

◆ operator==() [2/2]

template<class SymbolType >
bool rte::FormalRTESubstitution< SymbolType >::operator== ( const FormalRTESubstitution< SymbolType > &  other) const

The equality comparison implementation.

Parameters
otherthe other object to compare with.
Returns
true if this and other objects are equal, false othervise
Here is the call graph for this function:

◆ operator>>()

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::operator>> ( ext::ostream out) const
override

< FormalRTEElement < SymbolType > >::operator >> ( ext::ostream & ) const

< FormalRTEElement < SymbolType > >::operator >> ( ext::ostream & ) const

◆ setLeftElement() [1/2]

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::setLeftElement ( const FormalRTEElement< SymbolType > &  element)

Setter of the tree to substitute in

Parameters
elementthe tree to substitute in
Here is the call graph for this function:

◆ setLeftElement() [2/2]

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::setLeftElement ( FormalRTEElement< SymbolType > &&  element)

Setter of the tree to substitute by

Parameters
elementthe tree to substitute by

◆ setRightElement() [1/2]

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::setRightElement ( const FormalRTEElement< SymbolType > &  element)

Setter of the tree to substitute in

Parameters
elementthe tree to substitute in
Here is the call graph for this function:

◆ setRightElement() [2/2]

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::setRightElement ( FormalRTEElement< SymbolType > &&  element)

Setter of the tree to substitute by

Parameters
elementthe tree to substitute by

◆ setSubstitutionSymbol()

template<class SymbolType >
void rte::FormalRTESubstitution< SymbolType >::setSubstitutionSymbol ( FormalRTESymbolSubst< SymbolType >  symbol)

Setter of the substitution symbol

Parameters
elementthe substitution symbol

◆ testSymbol()

template<class SymbolType >
bool rte::FormalRTESubstitution< SymbolType >::testSymbol ( const common::ranked_symbol< SymbolType > &  symbol) const
override

< SymbolType >::testSymbol ( const common::ranked_symbol < SymbolType > & ) const

Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol < SymbolType >::testSymbol ( const common::ranked_symbol < SymbolType > & ) const

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