5 #ifndef BPP_SEQ_ALPHABETINDEX_CODONFROMPROTEICALPHABETINDEX1_H
6 #define BPP_SEQ_ALPHABETINDEX_CODONFROMPROTEICALPHABETINDEX1_H
9 #include "../Alphabet/CodonAlphabet.h"
10 #include "../GeneticCode/GeneticCode.h"
22 std::shared_ptr<const CodonAlphabet>
alpha_;
28 std::shared_ptr<const GeneticCode> gencode,
29 std::shared_ptr<const AlphabetIndex1> protalphindex) :
36 throw Exception(
"CodonFromProteicAlphabetIndex1: Not a Proteic Alphabet for CodonAlphabetIndex1.");
68 double getIndex(
const std::string& state)
const override
89 void fillIndex_(std::shared_ptr<const AlphabetIndex1> protAlphIndex_)
91 for (
int i = 0; i < 64; i++)
One dimensionnal alphabet index interface.
AlphabetIndex1 for codon based on ProteicAlphabetIndex1.
const std::vector< double > & indexVector() const override
CodonFromProteicAlphabetIndex1(std::shared_ptr< const GeneticCode > gencode, std::shared_ptr< const AlphabetIndex1 > protalphindex)
std::vector< double > vIndex_
const Alphabet & alphabet() const override
Get the alphabet associated to this index.
CodonFromProteicAlphabetIndex1 * clone() const override
double getIndex(const std::string &state) const override
Get the index associated to a state.
virtual ~CodonFromProteicAlphabetIndex1()
std::shared_ptr< const CodonAlphabet > alpha_
double getIndex(int state) const override
Get the index associated to a state.
std::shared_ptr< const Alphabet > getAlphabet() const override
Get the alphabet associated to this index.
CodonFromProteicAlphabetIndex1 & operator=(const CodonFromProteicAlphabetIndex1 &cfp)
CodonFromProteicAlphabetIndex1(const CodonFromProteicAlphabetIndex1 &cfp)
std::shared_ptr< const GeneticCode > gencode_
void fillIndex_(std::shared_ptr< const AlphabetIndex1 > protAlphIndex_)
This alphabet is used to deal NumericAlphabet.