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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.index.preprocessed.snn.SharedNearestNeighborPreprocessor.Factory<O,D>
All Implemented Interfaces:
IndexFactory<O,SharedNearestNeighborPreprocessor<O,D>>, SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborPreprocessor<O,D>>, InspectionUtilFrequentlyScanned, Parameterizable
Enclosing class:
SharedNearestNeighborPreprocessor<O,D extends Distance<D>>

public static class SharedNearestNeighborPreprocessor.Factory<O,D extends Distance<D>>
extends Object
implements SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborPreprocessor<O,D>>, Parameterizable

Factory class


Nested Class Summary
static class SharedNearestNeighborPreprocessor.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<O,D> distanceFunction
          Hold the distance function to be used.
static OptionID NUMBER_OF_NEIGHBORS_ID
          Parameter to indicate the number of neighbors to be taken into account for the shared-nearest-neighbor similarity.
protected  int numberOfNeighbors
          Holds the number of nearest neighbors to be used.
 
Constructor Summary
SharedNearestNeighborPreprocessor.Factory(int numberOfNeighbors, DistanceFunction<O,D> distanceFunction)
          Constructor.
 
Method Summary
 TypeInformation getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
 int getNumberOfNeighbors()
          Get the number of neighbors
 SharedNearestNeighborPreprocessor<O,D> instantiate(Relation<O> relation)
          Instantiate the index for a given database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUMBER_OF_NEIGHBORS_ID

public static final OptionID NUMBER_OF_NEIGHBORS_ID
Parameter to indicate the number of neighbors to be taken into account for the shared-nearest-neighbor similarity.

Default value: 1

Key: sharedNearestNeighbors


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: SNNDistanceFunction


numberOfNeighbors

protected int numberOfNeighbors
Holds the number of nearest neighbors to be used.


distanceFunction

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

Constructor Detail

SharedNearestNeighborPreprocessor.Factory

public SharedNearestNeighborPreprocessor.Factory(int numberOfNeighbors,
                                                 DistanceFunction<O,D> distanceFunction)
Constructor.

Parameters:
numberOfNeighbors - Number of neighbors
distanceFunction - Distance function
Method Detail

instantiate

public SharedNearestNeighborPreprocessor<O,D> instantiate(Relation<O> relation)
Description copied from interface: SharedNearestNeighborIndex.Factory
Instantiate the index for a given database.

Specified by:
instantiate in interface IndexFactory<O,SharedNearestNeighborPreprocessor<O,D extends Distance<D>>>
Specified by:
instantiate in interface SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborPreprocessor<O,D extends Distance<D>>>
Parameters:
relation - Database type
Returns:
Index

getNumberOfNeighbors

public int getNumberOfNeighbors()
Get the number of neighbors

Specified by:
getNumberOfNeighbors in interface SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborPreprocessor<O,D extends Distance<D>>>
Returns:
NN size

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,SharedNearestNeighborPreprocessor<O,D extends Distance<D>>>
Returns:
Type restriction

Release 0.4.0 (2011-09-20_1324)