ToPS
Public Member Functions
tops::Alphabet Class Reference

A class representing Alphabet. More...

#include <Alphabet.hpp>

List of all members.

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.

Detailed Description

A class representing Alphabet.

Definition at line 48 of file Alphabet.hpp.


Member Function Documentation

SymbolPtr tops::Alphabet::createSymbol ( const std::string &  name)

Creates a new symbol.

Parameters:
nameis 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.

Parameters:
sis the name of the symbol
Returns:
true if the name of the symbol is in the Alphabet

Definition at line 31 of file Alphabet.cpp.


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