de.lmu.ifi.dbs.elki.algorithm
Class MaterializeDistances<O,D extends NumberDistance<D,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<R>
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm<O,D,CollectionResult<CTriple<DBID,DBID,Double>>>
          extended by de.lmu.ifi.dbs.elki.algorithm.MaterializeDistances<O,D>
Type Parameters:
O - Object type
D - Distance type
All Implemented Interfaces:
Algorithm, InspectionUtilFrequentlyScanned, Parameterizable

@Title(value="MaterializeDistances")
@Description(value="Materialize all distances in the data set to use as cached/precalculated data.")
public class MaterializeDistances<O,D extends NumberDistance<D,?>>
extends AbstractDistanceBasedAlgorithm<O,D,CollectionResult<CTriple<DBID,DBID,Double>>>

Algorithm to materialize all the distances in a data set. The result can then be used with the DoubleDistanceParser and MultipleFileInput to use cached distances. Symmetry is assumed.


Nested Class Summary
static class MaterializeDistances.Parameterizer<O,D extends NumberDistance<D,?>>
          Parameterization class.
 
Field Summary
private static Logging logger
          The logger for this class.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm
DISTANCE_FUNCTION_ID
 
Constructor Summary
MaterializeDistances(DistanceFunction<? super O,D> distanceFunction)
          Constructor.
 
Method Summary
 TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 CollectionResult<CTriple<DBID,DBID,Double>> run(Database database, Relation<O> relation)
          Iterates over all points in the database.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm
getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
makeParameterDistanceFunction, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final Logging logger
The logger for this class.

Constructor Detail

MaterializeDistances

public MaterializeDistances(DistanceFunction<? super O,D> distanceFunction)
Constructor.

Parameters:
distanceFunction - Parameterization
Method Detail

run

public CollectionResult<CTriple<DBID,DBID,Double>> run(Database database,
                                                       Relation<O> relation)
Iterates over all points in the database.


getLogger

protected Logging getLogger()
Description copied from class: AbstractAlgorithm
Get the (STATIC) logger for this class.

Specified by:
getLogger in class AbstractAlgorithm<CollectionResult<CTriple<DBID,DBID,Double>>>
Returns:
the static logger

getInputTypeRestriction

public TypeInformation[] getInputTypeRestriction()
Description copied from class: AbstractAlgorithm
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Specified by:
getInputTypeRestriction in class AbstractAlgorithm<CollectionResult<CTriple<DBID,DBID,Double>>>
Returns:
Type restriction

Release 0.4.0 (2011-09-20_1324)