40 #ifndef _CASEMASKEDALPHABET_H_ 41 #define _CASEMASKEDALPHABET_H_ 92 bool isMasked(
int state)
const {
return state >= 100; }
93 bool isMasked(
const std::string& state)
const {
94 char c = state.c_str()[0];
98 return isalpha(state) && !isupper(state);
123 #endif //_CASEMASKEDALPHABET_H_ LetterAlphabet & operator=(const LetterAlphabet &bia)
An alphabet exception thrown when trying to specify a bad char to the alphabet.
unsigned int getNumberOfTypes() const
Get the number of distinct states in alphabet (e.g. return 15 for DNA alphabet). This is the number o...
This alphabet is used to deal NumericAlphabet.
const Alphabet * getUnmaskedAlphabet() const
virtual bool isUnresolved(int state) const =0
virtual unsigned int getSize() const =0
Get the number of resolved states in the alphabet (e.g. return 4 for DNA alphabet). This is the method you'll need in most cases.
CaseMaskedAlphabet(const CaseMaskedAlphabet &cma)
bool isMasked(int state) const
bool isUnresolved(const std::string &state) const
Specialized partial implementation of Alphabet using single letters.
std::string getAlphabetType() const
Identification method.
bool isUnresolved(int state) const
int getMaskedEquivalentState(int state) const
Get the masked state equivalent to the input one.
CaseMaskedAlphabet & operator=(const CaseMaskedAlphabet &cma)
unsigned int getSize() const
Get the number of resolved states in the alphabet (e.g. return 4 for DNA alphabet). This is the method you'll need in most cases.
CaseMaskedAlphabet * clone() const
bool isMasked(char state) const
An alphabet exception thrown when trying to specify a bad int to the alphabet.
bool isMasked(const std::string &state) const
const LetterAlphabet * nocaseAlphabet_
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...
int getUnknownCharacterCode() const
CaseMaskedAlphabet(const LetterAlphabet *nocaseAlphabet)
Case-sensitive letter alphabet.
virtual int getUnknownCharacterCode() const =0