Class AbstractMaterializeKNNPreprocessor.Factory<O>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected elki.distance.Distance<? super O> distance
      Hold the distance function to be used.
      static elki.utilities.optionhandling.OptionID DISTANCE_FUNCTION_ID
      Parameter to indicate the distance function to be used to ascertain the nearest neighbors.
      protected int k
      Holds the value of K_ID.
      static elki.utilities.optionhandling.OptionID K_ID
      Parameter to specify the number of nearest neighbors of an object to be materialized. must be an integer greater than 1.
    • Constructor Summary

      Constructors 
      Constructor Description
      Factory​(int k, elki.distance.Distance<? super O> distance)
      Index factory.
    • Field Detail

      • K_ID

        public static final elki.utilities.optionhandling.OptionID K_ID
        Parameter to specify the number of nearest neighbors of an object to be materialized. must be an integer greater than 1.
      • DISTANCE_FUNCTION_ID

        public static final elki.utilities.optionhandling.OptionID DISTANCE_FUNCTION_ID
        Parameter to indicate the distance function to be used to ascertain the nearest neighbors.
      • k

        protected int k
        Holds the value of K_ID.
      • distance

        protected elki.distance.Distance<? super O> distance
        Hold the distance function to be used.
    • Constructor Detail

      • Factory

        public Factory​(int k,
                       elki.distance.Distance<? super O> distance)
        Index factory.
        Parameters:
        k - k parameter
        distance - distance function
    • Method Detail

      • instantiate

        public abstract AbstractMaterializeKNNPreprocessor<O> instantiate​(elki.database.relation.Relation<O> relation)
        Specified by:
        instantiate in interface elki.index.IndexFactory<O>
      • getDistance

        public elki.distance.Distance<? super O> getDistance()
        Get the distance function.
        Returns:
        Distance function
      • getInputTypeRestriction

        public elki.data.type.TypeInformation getInputTypeRestriction()
        Specified by:
        getInputTypeRestriction in interface elki.index.IndexFactory<O>