Class DNAAmbPack

    • Method Detail

      • pack

        public byte pack​(Symbol sym)
        Description copied from interface: Packing

        Return a byte representing the packing of a symbol. The bits will be from 1 >> 0 through to 1 >> (wordSize - 1).

        Specified by:
        pack in interface Packing
        Parameters:
        sym - the Symbol to pack
        Returns:
        a byte containing the packed symbol
      • unpack

        public Symbol unpack​(byte b)
        Description copied from interface: Packing

        Return the symbol for a packing.

        Specified by:
        unpack in interface Packing
        Parameters:
        b - the byte pattern for a Symbol
        Returns:
        the Symbol that was packed
      • wordSize

        public byte wordSize()
        Description copied from interface: Packing

        The number of bits required to pack a symbol.

        Specified by:
        wordSize in interface Packing
        Returns:
        the word size as a byte
      • handlesAmbiguity

        public boolean handlesAmbiguity()
        Description copied from interface: Packing

        Flag to state if ambiguities are stored.

        Packings are free to either store ambiguity information or to discard it (presumably converting all ambiguities to a standard AtomicSymbol and then packing that). You can check wether ambiguities are handled by calling this method.

        Specified by:
        handlesAmbiguity in interface Packing
        Returns:
        true if ambiguities are stored, false otherwise