Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Linear wildcard string. More...
#include <WildcardLinearString.h>
Public Member Functions | |
WildcardLinearString (ext::set< SymbolType > alphabet, ext::vector< SymbolType > str, SymbolType wildcard) | |
Creates a new instance of the string with a concrete alphabet, content and wildcard. More... | |
WildcardLinearString (ext::vector< SymbolType > str, SymbolType wildcard) | |
Creates a new instance of the string based on content and the wildcard, the alphabet is implicitly created from the content. More... | |
WildcardLinearString (const std::string &str, char wildcard) | |
Creates a new instance of the string from the standard string and the wildcard. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char. More... | |
WildcardLinearString (const std::string &str) | |
Creates a new instance of the string from the standard string. The wildcard is defaultly constructed. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char. More... | |
WildcardLinearString (const char *str, char wildcard) | |
Creates a new instance of the string from c-string and the wildcard. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char. More... | |
WildcardLinearString (const LinearString< SymbolType > &string, SymbolType wildcard) | |
Creates a new instance of the string based on a linear string. It copies the alphabet and content. The wildcard is set from the the parametery. More... | |
WildcardLinearString (const LinearString< SymbolType > &string) | |
Creates a new instance of the string based on a linear string. It copies the alphabet and content. The wildcard is defaultly constructed. More... | |
const ext::set< SymbolType > & | getAlphabet () const & |
ext::set< SymbolType > && | getAlphabet () && |
void | extendAlphabet (const ext::set< SymbolType > &symbols) |
const SymbolType & | getWildcardSymbol () const & |
SymbolType && | getWildcardSymbol () && |
bool | setWildcardSymbol (SymbolType wildcard) |
void | appendSymbol (SymbolType symbol) |
const ext::vector< SymbolType > & | getContent () const & |
ext::vector< SymbolType > && | getContent () && |
void | setContent (ext::vector< SymbolType > str) |
bool | isEmpty () const |
auto | operator<=> (const WildcardLinearString &other) const |
bool | operator== (const WildcardLinearString &other) const |
![]() | |
void | accessComponent () |
Friends | |
ext::ostream & | operator<< (ext::ostream &out, const WildcardLinearString &instance) |
Additional Inherited Members | |
![]() | |
static void | registerComponent () |
static void | unregisterComponent () |
Linear wildcard string.
S = (A, C, W), A (Alphabet) = finite set of symbols, C (Content) = representation of the string content W (Wildcard symbol) = symbol representing an wildcard symbol
SymbolType | used for the terminal alphabet |
|
explicit |
Creates a new instance of the string with a concrete alphabet, content and wildcard.
alphabet | the initial alphabet of the string |
str | the initial content of the string |
wildcard | the explicit wildcard symbol |
|
explicit |
Creates a new instance of the string based on content and the wildcard, the alphabet is implicitly created from the content.
str | the initial content of the string |
wildcard | the explicit wildcard symbol |
|
explicit |
Creates a new instance of the string from the standard string and the wildcard. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char.
str | the initial content of the string |
wildcard | the explicit wildcard symbol |
|
explicit |
Creates a new instance of the string from the standard string. The wildcard is defaultly constructed. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char.
str | the initial content of the string |
|
explicit |
Creates a new instance of the string from c-string and the wildcard. The alphabet is deduced from the content. The constructor expects SymbolType of the string is constructible from char.
str | the initial content of the string |
wildcard | the explicit wildcard symbol |
|
explicit |
Creates a new instance of the string based on a linear string. It copies the alphabet and content. The wildcard is set from the the parametery.
string | the linear string to base the string on |
wildcard | the explicit wildcard symbol |
|
explicit |
Creates a new instance of the string based on a linear string. It copies the alphabet and content. The wildcard is defaultly constructed.
string | the linear string to base the string on |
void string::WildcardLinearString< SymbolType >::appendSymbol | ( | SymbolType | symbol | ) |
Appender of a symbol to the string.
symbol | the symbol to be added to the end of the string |
|
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::vector< SymbolType > && string::WildcardLinearString< SymbolType >::getContent | ( | ) | && |
Getter of the string content.
const ext::vector< SymbolType > & string::WildcardLinearString< SymbolType >::getContent | ( | ) | const & |
Getter of the string content.
|
inline |
Getter of the wildcard symbol
|
inline |
Getter of the wildcard symbol
bool string::WildcardLinearString< SymbolType >::isEmpty |
Test function to determine whether the cyclic string is empty
|
inline |
The three way comparison implementation
other | the other instance |
other
.
|
inline |
The equality comparison implementation.
other | the other object to compare with. |
void string::WildcardLinearString< SymbolType >::setContent | ( | ext::vector< SymbolType > | str | ) |
Setter of the string content.
CommonException | when new string contains symbols not present in the alphabet |
new | List of symbols forming string. |
|
inline |
Setter of the wildcard symbol
wildcard | new wildcard symbol of the string |
|
friend |
Print this object as raw representation to ostream.
out | ostream where to print |
instance | object to print |