Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <FormalRTEElement.h>
Data Structures | |
class | ConstVisitor |
class | ConstVisitorContext |
class | Visitor |
class | VisitorContext |
Public Member Functions | |
virtual FormalRTEElement< SymbolType > * | clone () const &=0 |
virtual FormalRTEElement< SymbolType > * | clone () &&=0 |
template<class ReturnType , class Visitorr , class ... Params> | |
ReturnType | accept (Params &&... params) const |
template<class ReturnType , class Visitorr , class ... Params> | |
ReturnType | accept (Params &&... params) |
virtual bool | testSymbol (const common::ranked_symbol< SymbolType > &symbol) const =0 |
virtual void | computeMinimalAlphabet (ext::set< common::ranked_symbol< SymbolType > > &alphabetF, ext::set< common::ranked_symbol< SymbolType > > &alphabetK) const =0 |
std::pair< ext::set< common::ranked_symbol< SymbolType > >, ext::set< common::ranked_symbol< SymbolType > > > | computeMinimalAlphabets () const |
virtual bool | checkAlphabet (const ext::set< common::ranked_symbol< SymbolType > > &alphabetF, const ext::set< common::ranked_symbol< SymbolType > > &alphabetK) const =0 |
virtual ext::smart_ptr< FormalRTEElement< DefaultSymbolType > > | normalize () &&=0 |
Traverses the rte tree and normalizes the symbols to DefaultSymbolType. More... | |
virtual void | operator>> (ext::ostream &) const =0 |
virtual std::strong_ordering | operator<=> (const FormalRTEElement< SymbolType > &other) const =0 |
Three way comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy. More... | |
virtual bool | operator== (const FormalRTEElement< SymbolType > &other) const =0 |
Comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy. More... | |
![]() | |
BaseNode () | |
Constructor of the tree hierarchy base class. More... | |
BaseNode (const BaseNode &) | |
Copy construction does not copy the parent pointer. More... | |
BaseNode (BaseNode &&) noexcept | |
Move construction does not copy the parent pointer. More... | |
virtual | ~BaseNode () noexcept=default |
Destructor of the tree hierarchy base class. More... | |
BaseNode & | operator= (const BaseNode &) |
Copy assignment does not change the parent pointer. More... | |
BaseNode & | operator= (BaseNode &&) noexcept |
Move assignment does not change the parent pointer. More... | |
FormalRTEElement< SymbolType > * | getParent () |
Getter of the parent of the node. More... | |
const FormalRTEElement< SymbolType > * | getParent () const |
Getter of the parent of the node. More... | |
Protected Member Functions | |
virtual void | accept (FormalRTEElement::ConstVisitor &visitor) const =0 |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated. More... | |
virtual void | accept (FormalRTEElement::Visitor &visitor)=0 |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated. More... | |
Friends | |
ext::ostream & | operator<< (ext::ostream &os, const FormalRTEElement< SymbolType > &instance) |
Abstract class representing element in the formal regular tree expression. Can be an operator, special node, or a symbol.
SymbolType | used for the symbol part of the ranked symbol |
|
protectedpure virtual |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated.
visitor | the accepted visitor. |
|
protectedpure virtual |
Accept method of the visitor pattern. This is where the actual type of this object is evaluated.
visitor | the accepted visitor. |
|
inline |
Visitor interface method.
ReturnType | the return type of the result of the visit |
Visitorr | the type of the actuall visitor |
Params | ... types of data passed with the visitor call |
\params params ... Additional params passed to visited nodes
|
inline |
Visitor interface method.
ReturnType | the return type of the result of the visit |
Visitorr | the type of the actuall visitor |
Params | ... types of data passed with the visitor call |
\params params ... Additional params passed to visited nodes
|
pure virtual |
Traverses the rte tree and checks whether all symbols in the rte tree are in the alphabet
alphabetF | All terminal alphabet symbols encountered are added into this set |
alphabetK | All substitution alphabet symbols encountered are added into this set |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Traverses the rte tree computing minimal alphabet needed by rte
alphabetF | All terminal alphabet symbols encountered are added into this set |
alphabetK | All substitution alphabet symbols encountered are added into this set |
std::pair< ext::set< common::ranked_symbol< SymbolType > >, ext::set< common::ranked_symbol< SymbolType > > > FormalRTEElement::computeMinimalAlphabets |
Traverses the rte tree computing minimal symbol alphabet and substitution alphabet needed by rte
|
pure virtual |
Traverses the rte tree and normalizes the symbols to DefaultSymbolType.
|
pure virtual |
Three way comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy.
If the other class is of different type the relative order is computer by means of type_index.
other | the other class to compare with |
|
pure virtual |
Comparison helper method evaluating allowing possibly deeper comparison of this with other class of the same hierarchy.
If the other class is of different type the relative order is computer by means of type_index.
other | the other class to compare with |
|
pure virtual |
Print this instance as raw representation to ostream.
os | ostream where to print |
|
pure virtual |
Traverses the rte tree looking if particular Symbol is used in the rte.
symbol | to test if used in rte element |
|
friend |
Print this object as raw representation to ostream.
os | ostream where to print |
instance | object to print |