Package elki.index

Class AbstractRefiningIndex<O>

  • Type Parameters:
    O - Object type
    All Implemented Interfaces:
    Index
    Direct Known Subclasses:
    InMemoryIDistanceIndex, InMemoryLSHIndex.Instance, PartialVAFile, VAFile

    public abstract class AbstractRefiningIndex<O>
    extends java.lang.Object
    implements Index
    Abstract base class for Filter-refinement indexes. The number of refinements will be counted as individual page accesses.
    Since:
    0.5.0
    Author:
    Erich Schubert
    • Field Detail

      • relation

        protected final Relation<O> relation
        The representation we are bound to.
      • refinements

        private Counter refinements
        Refinement counter.
    • Constructor Detail

      • AbstractRefiningIndex

        public AbstractRefiningIndex​(Relation<O> relation)
        Constructor.
        Parameters:
        relation - Relation indexed
    • Method Detail

      • getLogger

        public abstract Logging getLogger()
        Get the class logger.
        Returns:
        Logger
      • countRefinements

        protected void countRefinements​(int i)
        Increment the refinement counter, if in use.
        Parameters:
        i - Increment.
      • logStatistics

        public void logStatistics()
        Description copied from interface: Index
        Send statistics to the logger, if enabled.

        Note: you must have set the logging level appropriately before initializing the index! Otherwise, the index might not have collected the desired statistics.

        Specified by:
        logStatistics in interface Index
      • refine

        protected O refine​(DBID id)
        Refine a given object (and count the refinement!).
        Parameters:
        id - Object id
        Returns:
        refined object