5 #ifndef BPP_SEQ_TRANSLITERATOR_H
6 #define BPP_SEQ_TRANSLITERATOR_H
66 virtual std::string
translate(
const std::string& state)
const = 0;
102 virtual std::string
reverse(
const std::string& state)
const = 0;
125 std::string
translate(
const std::string& state)
const override = 0;
143 std::string
reverse(
const std::string& state)
const override = 0;
Partial implementation of the ReverseTransliterator interface.
std::string reverse(const std::string &state) const override=0
Translate a given state coded as a string from target alphabet to source alphabet.
virtual ~AbstractReverseTransliterator()
int reverse(int state) const override=0
Translate a given state coded as a int from target alphabet to source alphabet.
AbstractReverseTransliterator()
Partial implementation of the Transliterator interface.
std::string translate(const std::string &state) const override=0
Translate a given state coded as a string from source alphabet to target alphabet.
int translate(int state) const override=0
Translate a given state coded as a int from source alphabet to target alphabet.
virtual ~AbstractTransliterator()
The same as previous, but can perform the reverse translation, eg: RNA -> DNA and DNA -> RNA;.
virtual int reverse(int state) const =0
Translate a given state coded as a int from target alphabet to source alphabet.
virtual std::unique_ptr< Sequence > reverse(const SequenceInterface &sequence) const =0
Translate a whole sequence from target alphabet to source alphabet.
ReverseTransliteratorInterface()
virtual ~ReverseTransliteratorInterface()
virtual std::string reverse(const std::string &state) const =0
Translate a given state coded as a string from target alphabet to source alphabet.
This interface is used when translating a sequence from an alphabet to another: it gives the translat...
virtual std::shared_ptr< const Alphabet > getTargetAlphabet() const =0
Get the target alphabet.
virtual std::shared_ptr< const Alphabet > getSourceAlphabet() const =0
Get the source alphabet.
virtual std::unique_ptr< Sequence > translate(const SequenceInterface &sequence) const =0
Translate a whole sequence from source alphabet to target alphabet.
virtual const Alphabet & sourceAlphabet() const =0
Get the source alphabet.
virtual std::string translate(const std::string &state) const =0
Translate a given state coded as a string from source alphabet to target alphabet.
virtual const Alphabet & targetAlphabet() const =0
Get the target alphabet.
TransliteratorInterface()
virtual ~TransliteratorInterface()
virtual int translate(int state) const =0
Translate a given state coded as a int from source alphabet to target alphabet.
This alphabet is used to deal NumericAlphabet.