Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm
Class MaterializeDistances<V extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,R>
          extended by de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<V,D,CollectionResult<CTriple<Integer,Integer,Double>>>
              extended by de.lmu.ifi.dbs.elki.algorithm.MaterializeDistances<V,D,N>
Type Parameters:
V - Vector type
D - Distance type
N - Number type for distance
All Implemented Interfaces:
Algorithm<V,CollectionResult<CTriple<Integer,Integer,Double>>>, Parameterizable

@Title(value="MaterializeDistances")
@Description(value="Materialize all distances in the data set to use as cached/precalculated data.")
public class MaterializeDistances<V extends DatabaseObject,D extends NumberDistance<D,N>,N extends Number>
extends DistanceBasedAlgorithm<V,D,CollectionResult<CTriple<Integer,Integer,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.

Author:
Erich Schubert

Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
MaterializeDistances(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected  CollectionResult<CTriple<Integer,Integer,Double>> runInTime(Database<V> database)
          Iterates over all points in the database.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
getDistanceFactory, getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaterializeDistances

public MaterializeDistances(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

runInTime

protected CollectionResult<CTriple<Integer,Integer,Double>> runInTime(Database<V> database)
                                                               throws IllegalStateException
Iterates over all points in the database.

Specified by:
runInTime in class AbstractAlgorithm<V extends DatabaseObject,CollectionResult<CTriple<Integer,Integer,Double>>>
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

Release 0.3 (2010-03-31_1612)