41 #ifndef _NUMERICALPHABET_H_ 42 #define _NUMERICALPHABET_H_ 47 #include <Bpp/Numeric/Prob/UniformDiscreteDistribution.h> 61 const UniformDiscreteDistribution*
pdd_;
89 bool isGap(
int state)
const;
130 #endif // _NUMERICALPHABET_H_ This is the base class to describe states in an Alphabet.
bool isUnresolved(int state) const
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...
bool isGap(int state) const
This alphabet is used to deal NumericAlphabet.
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.
double intToValue(int state) const
Returns the value for the character number.
int getUnknownCharacterCode() const
std::map< double, size_t > values_
double getDelta() const
Returns the difference between successive values.
const UniformDiscreteDistribution * pdd_
bool containsGap(const std::string &state) const
void remap()
Re-update the maps.
NumericAlphabet & operator=(const NumericAlphabet &)
NumericAlphabet(const UniformDiscreteDistribution &)
virtual ~NumericAlphabet()
void setState(size_t pos, AlphabetState *st)
Set a state in the Alphabet.
void registerState(AlphabetState *st)
Add a state to the Alphabet.
A partial implementation of the Alphabet interface.
NumericAlphabet * clone() const
AlphabetNumericState & getStateAt(size_t stateIndex)
Get a state at a position in the alphabet_ vector.
An alphabet exception thrown when trying to specify a bad int to the alphabet.
States that do have a double value.
std::string getAlphabetType() const
Identification method.
size_t getValueIndex(double value) const
Returns the CategoryIndex of the category to which the value belongs.
std::vector< int > getAlias(int state) const
Get all resolved states that match a generic state.