Package com.qfs.dic

Interface IWritableIntegerArrayDictionary

All Superinterfaces:
Cloneable, IClone<IIntegerArrayDictionary>, ICompressible, IDictionary<int[]>, IIntegerArrayDictionary, IMemoryMonitored, IPointList, ITable, IUnnamedColumnarTable, IWritableDictionary<int[]>, Serializable
All Known Subinterfaces:
IFixedLengthIntegerArrayDictionary
All Known Implementing Classes:
AFixedLengthIntegerArrayDictionary, BucketedIntegerArrayDictionary, ColumnarIntegerArrayDictionary, FixedLengthIntegerArrayDictionary, IntegerArrayDictionary, IntegerArrayDictionaryWithHash, IntegerArrayPermutationDictionary, TranslatedIntegerArrayDictionary

public interface IWritableIntegerArrayDictionary extends IWritableDictionary<int[]>, IIntegerArrayDictionary
Author:
ActiveViam
  • Field Details

    • NEW_MAPPING

      static final long NEW_MAPPING
      A flag indicating that the mapping has added a new element to this dictionary (see mapWithFlags(int[])).
      See Also:
    • REUSABLE_INPUT

      static final long REUSABLE_INPUT
      A flag indicating that the mapping has not directly stored its input array without any copying. The input array can therefore only be modified afterward if this flag is set. Otherwise, the caller cannot modify it. (see mapWithFlags(int[]))
      See Also:
  • Method Details

    • clone

      Description copied from interface: IClone
      This method is very similar to the one used by Object except that it returns the real class.
      Specified by:
      clone in interface IClone<IIntegerArrayDictionary>
      Returns:
      a clone of the object
    • mapAndHash

      long mapAndHash(int[] point)
      Indexes a point in this dictionary and returns its associated address and hash value.

      If the point already exists in the dictionary (with respect to the equals / hashCode contract), the dictionary is left unchanged and the position of the already existing version of this Object is returned. Otherwise, this point is inserted in this dictionary and the new position is returned.

      The returned long packs 2 integers: the point's hash code and its address in the dictionary. The upper, most significant bits of the long (that can be read using Bits.unpack1(long)) contain the hash value, while the lower, least significant bits (that can be read using Bits.unpack2(long)) contain the point's address.

      Parameters:
      point - The point to map
      Returns:
      A long packing the hash value and the position of this point in the dictionary
      See Also:
    • mapWithFlags

      long mapWithFlags(int[] array)
      Maps the given array into this dictionary.

      The lower bits of the returned long (as returned by Bits.unpack2(long)) contain the position of this array in this dictionary, while the upper bits contain various flags.

      Parameters:
      array - The array to map.
      Returns:
      A long packing the mapped position of the input array in the dictionary and various flags.
    • mapFromCell

      default int mapFromCell(IReadableCell cell)
      Description copied from interface: IWritableDictionary
      Maps the value stored by a cell into this dictionary.
      Specified by:
      mapFromCell in interface IWritableDictionary<int[]>
      Parameters:
      cell - cell containing the value to map
      Returns:
      the dictionary position for the mapped value