50 #include <Bpp/Clonable.h> 131 public virtual Clonable
142 #ifndef NO_VIRTUAL_COV 178 virtual int getIntCodeAt(
size_t stateIndex)
const throw (IndexOutOfBoundsException) = 0;
184 virtual const std::string&
getCharCodeAt(
size_t stateIndex)
const throw (IndexOutOfBoundsException) = 0;
319 virtual unsigned int getSize()
const = 0;
408 virtual bool isGap(
int state)
const = 0;
414 virtual bool isGap(
const std::string& state)
const = 0;
426 virtual bool isUnresolved(
const std::string& state)
const = 0;
458 #endif // _ALPHABET_H_ This is the base class to describe states in an Alphabet.
virtual const std::vector< std::string > & getSupportedChars() const =0
virtual std::string getName(int state) const =0
Get the complete name of a state given its int description.
virtual int charToInt(const std::string &state) const =0
Give the int description of a state given its string description.
An alphabet exception thrown when trying to specify a bad char to the alphabet.
virtual int getGeneric(const std::vector< int > &states) const =0
Get the generic state that match a set of states.
virtual size_t getNumberOfStates() const =0
This is a convenient alias for getNumberOfChars(), returning a size_t instead of unsigned int...
virtual bool isGap(int state) const =0
This alphabet is used to deal NumericAlphabet.
virtual bool isIntInAlphabet(int state) const =0
Tell if a state (specified by its int description) is allowed by the the alphabet.
virtual bool isUnresolved(int state) const =0
virtual const std::vector< int > & getSupportedInts() 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.
virtual unsigned int getStateCodingSize() const =0
Get the size of the string coding a state.
virtual std::vector< int > getAlias(int state) const =0
Get all resolved states that match a generic state.
virtual int getGapCharacterCode() const =0
virtual bool isCharInAlphabet(const std::string &state) const =0
Tell if a state (specified by its string description) is allowed by the the alphabet.
virtual const std::string & getCharCodeAt(size_t stateIndex) const =0
virtual const AlphabetState & getState(int state) const =0
Get a state given its int description.
Alphabet * clone() const =0
virtual size_t getStateIndex(int state) const =0
virtual unsigned int getNumberOfChars() const =0
Get the number of supported characters in this alphabet, including generic characters (e...
The alphabet exception base class.
virtual int getIntCodeAt(size_t stateIndex) const =0
virtual std::string intToChar(int state) const =0
Give the string description of a state given its int description.
An alphabet exception thrown when trying to specify a bad int to the alphabet.
virtual bool equals(const Alphabet &alphabet) const =0
Comparison of alphabets.
virtual const AlphabetState & getStateAt(size_t stateIndex) const =0
Get a state given its index.
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 int getUnknownCharacterCode() const =0
virtual std::string getAlphabetType() const =0
Identification method.