5 #ifndef BPP_SEQ_ALPHABET_NUMERICALPHABET_H
6 #define BPP_SEQ_ALPHABET_NUMERICALPHABET_H
51 bool isGap(
int state)
const;
52 std::vector<int>
getAlias(
int state)
const;
53 std::vector<std::string>
getAlias(
const std::string& state)
const;
A partial implementation of the Alphabet interface.
States that do have a double value.
This is the base class to describe states in an Alphabet.
double intToValue(int state) const
Returns the value for the character number.
virtual ~NumericAlphabet()
NumericAlphabet & operator=(const NumericAlphabet &)
double getDelta() const
Returns the difference between successive values.
std::string getAlphabetType() const
Identification method.
bool containsGap(const std::string &state) const
unsigned int getSize() const
Get the number of resolved states in the alphabet (e.g. return 4 for DNA alphabet)....
const UniformDiscreteDistribution * pdd_
AlphabetNumericState & getStateAt(size_t stateIndex)
Get a state at a position in the alphabet_ vector.
std::map< double, size_t > values_
void setState(size_t pos, AlphabetState *st)
Set a state in the Alphabet.
NumericAlphabet * clone() const
int getUnknownCharacterCode() const
void registerState(AlphabetState *st)
Add a state to the Alphabet.
void remap()
Re-update the maps.
bool isUnresolved(int state) const
size_t getValueIndex(double value) const
Returns the CategoryIndex of the category to which the value belongs.
unsigned int getNumberOfTypes() const
Get the number of distinct states in alphabet (e.g. return 15 for DNA alphabet). This is the number o...
std::vector< int > getAlias(int state) const
Get all resolved states that match a generic state.
NumericAlphabet(const UniformDiscreteDistribution &)
bool isGap(int state) const
This alphabet is used to deal NumericAlphabet.