ToPS
|
A class representing Alphabet. More...
#include <Alphabet.hpp>
Public Member Functions | |
SymbolPtr | createSymbol (const std::string &name) |
Creates a new symbol. | |
unsigned int | size () |
Returns the alphabet size. | |
SymbolPtr | getSymbol (int k) |
Returns the symbol given an id. | |
SymbolPtr | getSymbol (const std::string &s) |
Get the symbol given the symbol name. | |
bool | has (const std::string &s) |
Returns true if the symbol name s is in the Alphabet. | |
void | initializeFromVector (const std::vector< std::string > &str) |
Initialize the alphabet using a list of symbols. | |
std::string | str () const |
String representation of this alphabet. |
A class representing Alphabet.
Definition at line 48 of file Alphabet.hpp.
SymbolPtr tops::Alphabet::createSymbol | ( | const std::string & | name | ) |
Creates a new symbol.
name | is the symbol name |
Definition at line 98 of file Alphabet.cpp.
bool tops::Alphabet::has | ( | const std::string & | s | ) |
Returns true if the symbol name s is in the Alphabet.
s | is the name of the symbol |
Definition at line 31 of file Alphabet.cpp.