Interface ReversibleTranslationTable

  • All Superinterfaces:
    TranslationTable
    All Known Implementing Classes:
    AbstractReversibleTranslationTable, SimpleReversibleTranslationTable

    public interface ReversibleTranslationTable
    extends TranslationTable
    A translation table that can also translate from the target to source alphabet.

    I guess this is encapsulates an invertible function, and the untranslate method is the inverse operation to translate.

    It is assumed that untranslate(translate(x)) = x for all x in the source alphabet, and that translate(untranslate(y)) = y for all y in the target alphabet. Note, one interesting sub-set of reversible transforms are of the form translate(x) = untranslate(x), and represent 'mirror image' transformations.

    Author:
    Matthew Pocock
    • Method Detail

      • untranslate

        Symbol untranslate​(Symbol sym)
                    throws IllegalSymbolException
        Translate a single symbol from target alphabet to the source alphabet.
        Parameters:
        sym - the Symbol to translate (member of target alphabet)
        Returns:
        the translated version of sym (member of source alphabet)
        Throws:
        IllegalSymbolException - if sym is not a member of the target alphabet