Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Nonlinear tree pattern represented in its natural representation. The representation is so called unranked, therefore it consists of unranked symbols. Additionally the pattern contains a special wildcard symbol representing any subtree and nonlinear variables each to represent same subtree (in the particular occurrence in a tree). More...
#include <UnrankedNonlinearPattern.h>
Public Member Functions | |
UnrankedNonlinearPattern (SymbolType subtreeWildcard, SymbolType subtreeGap, ext::set< SymbolType > nonlinearVariables, ext::set< SymbolType > alphabet, ext::tree< SymbolType > pattern) | |
Creates a new instance of the pattern with concrete alphabet, content, wildcard, and nonlinear variables. More... | |
UnrankedNonlinearPattern (SymbolType subtreeWildcard, SymbolType subtreeGap, ext::set< SymbolType > nonlinearVariables, ext::tree< SymbolType > pattern) | |
Creates a new instance of the pattern with concrete content, wildcard, and nonlinear variables. The alphabet is deduced from the content. More... | |
UnrankedNonlinearPattern (SymbolType subtreeWildcard, SymbolType subtreeGap, ext::tree< SymbolType > pattern) | |
Creates a new instance of the pattern with concrete content and wildcard. The alphabet is deduced from the content. Nonlinear variables are defaultly constructed to empty set. More... | |
UnrankedNonlinearPattern (const RankedNonlinearPattern< SymbolType > &other) | |
Creates a new instance of the pattern based on RankedNonlinearPattern, the alphabet is created from the content of the RankedNonlinearPattern. More... | |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
void | extendAlphabet (const ext::set< SymbolType > &symbols) |
const SymbolType & | getSubtreeWildcard () const & |
SymbolType && | getSubtreeWildcard () && |
const SymbolType & | getSubtreeGap () const & |
SymbolType && | getSubtreeGap () && |
const ext::set< SymbolType > & | getNonlinearVariables () const & |
ext::set< SymbolType > && | getNonlinearVariables () && |
const ext::tree< SymbolType > & | getContent () const & |
ext::tree< SymbolType > && | getContent () && |
void | setTree (ext::tree< SymbolType > pattern) |
auto | operator<=> (const UnrankedNonlinearPattern &other) const |
bool | operator== (const UnrankedNonlinearPattern &other) const |
void | nicePrint (ext::ostream &out) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const UnrankedNonlinearPattern &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Nonlinear tree pattern represented in its natural representation. The representation is so called unranked, therefore it consists of unranked symbols. Additionally the pattern contains a special wildcard symbol representing any subtree and nonlinear variables each to represent same subtree (in the particular occurrence in a tree).
T = ( A, C, W \in A, V \in A ), A (Alphabet) = finite set of symbols, C (Content) = pattern in its natural representation W (Wildcard) = special symbol representing any subtree V (Variables) = finite set of special symbols each representing same subtree
SymbolType | used for the symbol of the alphabet |
|
explicit |
Creates a new instance of the pattern with concrete alphabet, content, wildcard, and nonlinear variables.
subtreeWildcard | the wildcard symbol |
subtreeGap | effectively wildcard^* |
nonlinearVariables | the set of nonlinear variables |
alphabet | the initial alphabet of the pattern |
pattern | the initial content in it's natural representation |
|
explicit |
Creates a new instance of the pattern with concrete content, wildcard, and nonlinear variables. The alphabet is deduced from the content.
subtreeWildcard | the wildcard symbol |
subtreeGap | effectively wildcard^* |
nonlinearVariables | the set of nonlinear variables |
pattern | the initial content in it's natural representation |
|
explicit |
Creates a new instance of the pattern with concrete content and wildcard. The alphabet is deduced from the content. Nonlinear variables are defaultly constructed to empty set.
subtreeWildcard | the wildcard symbol |
subtreeGap | effectively wildcard^* |
pattern | the initial content in it's natural representation |
|
explicit |
Creates a new instance of the pattern based on RankedNonlinearPattern, the alphabet is created from the content of the RankedNonlinearPattern.
other | the pattern represented as RankedNonlinearPattern |
|
inline |
Adder of an alphabet symbols.
symbols | the new symbols to be added to the alphabet |
|
inline |
Getter of the alphabet.
|
inline |
Getter of the alphabet.
ext::tree< SymbolType > && tree::UnrankedNonlinearPattern< SymbolType >::getContent | ( | ) | && |
Getter of the pattern representation.
const ext::tree< SymbolType > & tree::UnrankedNonlinearPattern< SymbolType >::getContent | ( | ) | const & |
Getter of the pattern representation.
|
inline |
Getter of the nonlinear variables.
|
inline |
Getter of the nonlinear variables.
|
inline |
Getter of the wildcard symbol.
|
inline |
Getter of the wildcard symbol.
|
inline |
Getter of the wildcard symbol.
|
inline |
Getter of the wildcard symbol.
void tree::UnrankedNonlinearPattern< SymbolType >::nicePrint | ( | ext::ostream & | out | ) | const |
Nice printer of the tree natural representation
out | the output stream to print to |
|
inline |
The three way comparison implementation
other | the other instance |
other
.
|
inline |
The equality comparison implementation.
other | the other object to compare with. |
void tree::UnrankedNonlinearPattern< SymbolType >::setTree | ( | ext::tree< SymbolType > | pattern | ) |
Setter of the representation of the pattern.
TreeException | in same situations as checkAlphabet |
pattern | new representation of the pattern. |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |