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

Represents the iteration operator in the regular tree expression. The node has exactly one child. More...

#include <FormalRTEIteration.h>

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

Public Member Functions

 FormalRTEIteration (FormalRTEElement< SymbolType > &&element, FormalRTESymbolSubst< SymbolType > substitutionSymbol)
 Creates a new instance of the substitution node with explicit tree to iterate and a symbol representing place of substitution. More...
 
 FormalRTEIteration (const FormalRTEElement< SymbolType > &element, FormalRTESymbolSubst< SymbolType > substitutionSymbol)
 Creates a new instance of the substitution node with explicit tree to iterate and a symbol representing place of substitution. More...
 
FormalRTEIteration< SymbolType > * clone () const &override
 < SymbolType >::clone ( ) const & More...
 
FormalRTEIteration< 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 > & getElement () const
 
const FormalRTESymbolSubst< SymbolType > & getSubstitutionSymbol () const
 
FormalRTEElement< SymbolType > & getElement ()
 
FormalRTESymbolSubst< SymbolType > & getSubstitutionSymbol ()
 
void setElement (const FormalRTEElement< SymbolType > &element)
 
void setElement (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 FormalRTEIteration< SymbolType > &) const
 
bool operator== (const FormalRTEElement< SymbolType > &other) const override
 < SymbolType >::operator == ( const FormalRTEElement < SymbolType > & other ) const; More...
 
bool operator== (const FormalRTEIteration< 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::UnaryNode< FormalRTEElement< SymbolType > >
 UnaryNode (const FormalRTEElement< SymbolType > &c)
 Constructor of the class accepting the child node. More...
 
 UnaryNode (FormalRTEElement< SymbolType > &&c)
 Constructor of the class accepting the child node. More...
 
FormalRTEElement< SymbolType > & getChild ()
 Getter of the child of the node. More...
 
const FormalRTEElement< SymbolType > & getChild () const
 Getter of the child of the node. More...
 
void setChild (const FormalRTEElement< SymbolType > &c)
 Setter of the child of the node. More...
 
void setChild (FormalRTEElement< SymbolType > &&c)
 Setter of the 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::FormalRTEIteration< SymbolType >

Represents the iteration operator in the regular tree expression. The node has exactly one child.

The structure is derived from UnaryNode that provides the child node and its accessors.

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

Template Parameters
SymbolTypeused for the symbol part of the ranked symbol

Constructor & Destructor Documentation

◆ FormalRTEIteration() [1/2]

template<class SymbolType >
rte::FormalRTEIteration< SymbolType >::FormalRTEIteration ( FormalRTEElement< SymbolType > &&  element,
FormalRTESymbolSubst< SymbolType >  substitutionSymbol 
)
explicit

Creates a new instance of the substitution node with explicit tree to iterate and a symbol representing place of substitution.

Parameters
elementthe tree to iterate
substitutionSymbolthe symbol representing the substitution place

◆ FormalRTEIteration() [2/2]

template<class SymbolType >
rte::FormalRTEIteration< SymbolType >::FormalRTEIteration ( const FormalRTEElement< SymbolType > &  element,
FormalRTESymbolSubst< SymbolType >  substitutionSymbol 
)
explicit

Creates a new instance of the substitution node with explicit tree to iterate and a symbol representing place of substitution.

Parameters
elementthe tree to iterate
substitutionSymbolthe symbol representing the substitution place

Member Function Documentation

◆ checkAlphabet()

template<class SymbolType >
bool rte::FormalRTEIteration< 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 >
FormalRTEIteration< SymbolType > * rte::FormalRTEIteration< 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 >
FormalRTEIteration< SymbolType > * rte::FormalRTEIteration< 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::FormalRTEIteration< 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:

◆ getElement() [1/2]

template<class SymbolType >
FormalRTEElement< SymbolType > & rte::FormalRTEIteration< SymbolType >::getElement

Getter of the iterated tree

Returns
the iterated tree

◆ getElement() [2/2]

template<class SymbolType >
const FormalRTEElement< SymbolType > & rte::FormalRTEIteration< SymbolType >::getElement

Getter of the iterated tree

Returns
the iterated tree
Here is the caller graph for this function:

◆ getSubstitutionSymbol() [1/2]

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

Getter of the substitution symbol

Returns
the substitution symbol

◆ getSubstitutionSymbol() [2/2]

template<class SymbolType >
const FormalRTESymbolSubst< SymbolType > & rte::FormalRTEIteration< 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::FormalRTEIteration< 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::FormalRTEIteration< 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::FormalRTEIteration< SymbolType >::operator<=> ( const FormalRTEIteration< 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::FormalRTEIteration< 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::FormalRTEIteration< SymbolType >::operator== ( const FormalRTEIteration< 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::FormalRTEIteration< SymbolType >::operator>> ( ext::ostream out) const
override

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

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

◆ setElement() [1/2]

template<class SymbolType >
void rte::FormalRTEIteration< SymbolType >::setElement ( const FormalRTEElement< SymbolType > &  element)

Setter of the iterated tree

Parameters
elementthe iterated tree
Here is the call graph for this function:

◆ setElement() [2/2]

template<class SymbolType >
void rte::FormalRTEIteration< SymbolType >::setElement ( FormalRTEElement< SymbolType > &&  element)

Setter of the iterated tree

Parameters
elementthe iterated tree

◆ setSubstitutionSymbol()

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

Setter of the substitution symbol

Parameters
elementthe substitution symbol

◆ testSymbol()

template<class SymbolType >
bool rte::FormalRTEIteration< 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
Here is the call graph for this function:
Here is the caller graph for this function:

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