32 state =
static_cast<char>(toupper(
static_cast<int>(state)));
39 else if (d && !r && !p)
41 else if (!d && r && !p)
43 else if (!d && !r && p)
45 else if (d && r && !p)
47 else if (d && !r && p)
49 else if (!d && r && p)
61 size_t size = alphabet.
intToChar(0).size();
75 return checkAlphabetCodingSize(*alphabet);
82 if (!checkAlphabetCodingSize(alphabet))
83 throw AlphabetException(
"Bad alphabet in function Alphabet::getAlphabetCodingSize().", &alphabet);
84 return static_cast<unsigned int>(alphabet.
intToChar(0).size());
91 return getAlphabetCodingSize(*alphabet);
The alphabet exception base class.
int getNum() const
Get the state's number.
virtual unsigned int getNumberOfChars() const =0
Get the number of supported characters in this alphabet, including generic characters (e....
virtual std::string intToChar(int state) const =0
Give the string description of a state given its int description.
virtual unsigned int getNumberOfTypes() const =0
Get the number of distinct states in alphabet (e.g. return 15 for DNA alphabet). This is the number o...
virtual const AlphabetState & getStateAt(size_t stateIndex) const =0
Get a state given its index.
std::string toString(T t)
This alphabet is used to deal NumericAlphabet.