de.lmu.ifi.dbs.elki.algorithm
Class AbstractAlgorithm<R extends Result>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<R>
Type Parameters:
R - the result type
All Implemented Interfaces:
Algorithm, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
AbstractAggarwalYuOutlier, AbstractDistanceBasedAlgorithm, AbstractNeighborhoodOutlier, AbstractPrimitiveDistanceBasedAlgorithm, AbstractProjectedClustering, AbstractProjectedDBSCAN, APRIORI, ByLabelClustering, ByLabelHierarchicalClustering, ByLabelOutlier, CASH, CLIQUE, COPAC, DiSH, DummyAlgorithm, EM, EMOutlier, ERiC, ExternalDoubleOutlierScore, FeatureBagging, GaussianModel, GaussianUniformMixture, LOF, LoOP, NullAlgorithm, OPTICSXi, ReferenceBasedOutlierDetection, RescaleMetaOutlierAlgorithm, SNNClustering, SOD, SUBCLU, TrivialAllInOne, TrivialAllNoise, TrivialAllOutlier, TrivialNoOutlier

public abstract class AbstractAlgorithm<R extends Result>
extends Object
implements Algorithm

This class serves also as a model of implementing an algorithm within this framework. Any Algorithm that makes use of these flags may extend this class.


Constructor Summary
protected AbstractAlgorithm()
          Constructor.
 
Method Summary
abstract  TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
protected abstract  Logging getLogger()
          Get the (STATIC) logger for this class.
static
<F extends DistanceFunction<?,?>>
ObjectParameter<F>
makeParameterDistanceFunction(Class<?> defaultDistanceFunction, Class<?> restriction)
          Make a default distance function configuration option
 R run(Database database)
          Runs the algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAlgorithm

protected AbstractAlgorithm()
Constructor.

Method Detail

run

public R run(Database database)
Description copied from interface: Algorithm
Runs the algorithm.

Specified by:
run in interface Algorithm
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm

getInputTypeRestriction

public abstract TypeInformation[] getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Returns:
Type restriction

getLogger

protected abstract Logging getLogger()
Get the (STATIC) logger for this class.

Returns:
the static logger

makeParameterDistanceFunction

public static <F extends DistanceFunction<?,?>> ObjectParameter<F> makeParameterDistanceFunction(Class<?> defaultDistanceFunction,
                                                                                                 Class<?> restriction)
Make a default distance function configuration option

Type Parameters:
F - Distance function type
Parameters:
defaultDistanceFunction - Default value
restriction - Restriction class
Returns:
Parameter object

Release 0.4.0 (2011-09-20_1324)