12 std::shared_ptr<const NucleicAlphabet> nuc1,
13 std::shared_ptr<const NucleicAlphabet> nuc2) :
14 nuc1_(nuc1), nuc2_(nuc2), trans_()
39 nuc1_->intToChar(state);
45 int i =
nuc1_->charToInt(state);
54 auto tSeq = make_unique<Sequence>(sequence.
getName(),
"", sequence.
getComments(), alphaPtr);
55 for (
size_t i = 0; i < sequence.
size(); ++i)
65 nuc2_->intToChar(state);
71 int i =
nuc2_->charToInt(state);
80 auto rSeq = make_unique<Sequence>(sequence.
getName(),
"", sequence.
getComments(), alphaPtr);
81 for (
size_t i = 0; i < sequence.
size(); ++i)
Exception thrown when two alphabets do not match.
virtual const std::string & getName() const =0
Get the name of this sequence.
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Get the alphabet associated to the list.
virtual size_t size() const =0
Get the number of elements in the list.
std::shared_ptr< const NucleicAlphabet > nuc2_
std::map< int, int > trans_
std::shared_ptr< const Alphabet > getTargetAlphabet() const override
Get the target alphabet.
std::shared_ptr< const Alphabet > getSourceAlphabet() const override
Get the source alphabet.
int translate(int state) const override
Translate a given state coded as a int from source alphabet to target alphabet.
int reverse(int state) const override
Translate a given state coded as a int from target alphabet to source alphabet.
NucleicAcidsReplication(std::shared_ptr< const NucleicAlphabet > nuc1, std::shared_ptr< const NucleicAlphabet > nuc2)
std::shared_ptr< const NucleicAlphabet > nuc1_
virtual const T & getValue(size_t pos) const =0
checked access to a character in list.
This alphabet is used to deal NumericAlphabet.