de.lmu.ifi.dbs.elki.index.preprocessed.knn
Class AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor.Factory<O,D>
Type Parameters:
O - The object type
D - The distance type
All Implemented Interfaces:
IndexFactory<O,KNNIndex<O>>, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
MaterializeKNNPreprocessor.Factory, MetricalIndexApproximationMaterializeKNNPreprocessor.Factory, PartitionApproximationMaterializeKNNPreprocessor.Factory, SpatialApproximationMaterializeKNNPreprocessor.Factory
Enclosing class:
AbstractMaterializeKNNPreprocessor<O,D extends Distance<D>>

public abstract static class AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>>
extends Object
implements IndexFactory<O,KNNIndex<O>>

The parameterizable factory.


Nested Class Summary
static class AbstractMaterializeKNNPreprocessor.Factory.Parameterizer<O,D extends Distance<D>>
          Parameterization class.
 
Field Summary
static OptionID DISTANCE_FUNCTION_ID
          Parameter to indicate the distance function to be used to ascertain the nearest neighbors.
protected  DistanceFunction<? super O,D> distanceFunction
          Hold the distance function to be used.
protected  int k
          Holds the value of K_ID.
static 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
AbstractMaterializeKNNPreprocessor.Factory(int k, DistanceFunction<? super O,D> distanceFunction)
          Index factory.
 
Method Summary
 D getDistanceFactory()
          Get the distance factory.
 DistanceFunction<? super O,D> getDistanceFunction()
          Get the distance function.
 TypeInformation getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
abstract  AbstractMaterializeKNNPreprocessor<O,D> instantiate(Relation<O> relation)
          Sets the database in the distance function of this index (if existing).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K_ID

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

Key: -materialize.k


DISTANCE_FUNCTION_ID

public static final OptionID DISTANCE_FUNCTION_ID
Parameter to indicate the distance function to be used to ascertain the nearest neighbors.

Default value: EuclideanDistanceFunction

Key: materialize.distance


k

protected int k
Holds the value of K_ID.


distanceFunction

protected DistanceFunction<? super O,D extends Distance<D>> distanceFunction
Hold the distance function to be used.

Constructor Detail

AbstractMaterializeKNNPreprocessor.Factory

public AbstractMaterializeKNNPreprocessor.Factory(int k,
                                                  DistanceFunction<? super O,D> distanceFunction)
Index factory.

Parameters:
k - k parameter
distanceFunction - distance function
Method Detail

instantiate

public abstract AbstractMaterializeKNNPreprocessor<O,D> instantiate(Relation<O> relation)
Description copied from interface: IndexFactory
Sets the database in the distance function of this index (if existing).

Specified by:
instantiate in interface IndexFactory<O,KNNIndex<O>>
Parameters:
relation - the relation to index

getDistanceFunction

public DistanceFunction<? super O,D> getDistanceFunction()
Get the distance function.

Returns:
Distance function

getDistanceFactory

public D getDistanceFactory()
Get the distance factory.

Returns:
Distance factory

getInputTypeRestriction

public TypeInformation getInputTypeRestriction()
Description copied from interface: IndexFactory
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface IndexFactory<O,KNNIndex<O>>
Returns:
Type restriction

Release 0.4.0 (2011-09-20_1324)