Class VectorApproximation

  • All Implemented Interfaces:
    DBIDRef

    public class VectorApproximation
    extends java.lang.Object
    implements DBIDRef
    Object in a VA approximation.
    Since:
    0.5.0
    Author:
    Thomas Bernecker, Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int[] approximation
      approximation (va cell ids)
      (package private) int id
      Object id.
    • Field Detail

      • approximation

        int[] approximation
        approximation (va cell ids)
      • id

        int id
        Object id.
    • Constructor Detail

      • VectorApproximation

        public VectorApproximation​(DBIDRef id,
                                   int[] approximation)
        Constructor.
        Parameters:
        id - Object represented (may be null for query objects)
        approximation - Approximation
    • Method Detail

      • getDimensionality

        public int getDimensionality()
        Get the dimensionality
        Returns:
        Dimensionality
      • getApproximation

        public int getApproximation​(int dim)
        Get the VA approximation
        Parameters:
        dim - Dimension
        Returns:
        Bin number
      • internalGetIndex

        public int internalGetIndex()
        Description copied from interface: DBIDRef
        Internal only: Get the internal index.

        NOT FOR PUBLIC USE - ELKI Optimization engine only.

        Specified by:
        internalGetIndex in interface DBIDRef
        Returns:
        Internal index
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • byteOnDisk

        public static int byteOnDisk​(int numberOfDimensions,
                                     int numberOfPartitions)
        Computes IO costs (in bytes) needed for reading the candidates. For one object, log2(numberOfPartitions) bits have to be read per dimension.
        Parameters:
        numberOfDimensions - the number of relevant dimensions
        numberOfPartitions - the number of relevant partitions
        Returns:
        the cost values (in bytes)