Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm
Interface Algorithm<O extends DatabaseObject,R extends Result>

Type Parameters:
O - the type of DatabaseObjects handled by this Algorithm
R - the type of result to retrieve from this Algorithm
All Superinterfaces:
Parameterizable
All Known Subinterfaces:
ClusteringAlgorithm<C,O>
All Known Implementing Classes:
ABOD, AbstractAlgorithm, APRIORI, ByLabelClustering, ByLabelHierarchicalClustering, CASH, CLIQUE, ComputeROCCurve, COPAC, DBSCAN, DeLiClu, DependencyDerivator, DiSH, DistanceBasedAlgorithm, DistanceStatisticsWithClasses, DummyAlgorithm, EM, ERiC, EvaluateRankingQuality, FourC, KMeans, KNNDistanceOrder, KNNJoin, LOCI, LOF, MaterializeDistances, NullAlgorithm, OPTICS, ORCLUS, PreDeCon, PROCLUS, ProjectedClustering, ProjectedDBSCAN, RankingQualityHistogram, SLINK, SNNClustering, SOD, TrivialAllInOne, TrivialAllNoise

public interface Algorithm<O extends DatabaseObject,R extends Result>
extends Parameterizable

Specifies the requirements for any algorithm that is to be executable by the main class.

Any implementation needs not to take care of input nor output, parsing and so on. Those tasks are performed by the framework. An algorithm simply needs to ask for parameters that are algorithm specific.

Note: Any implementation is supposed to provide a constructor without parameters (default constructor).

Author:
Arthur Zimek
See Also:
AbstractAlgorithm

Method Summary
 Description getDescription()
          Returns a description of the algorithm.
 R getResult()
          Returns the result of the algorithm.
 R run(Database<O> database)
          Runs the algorithm.
 void setTime(boolean time)
          Sets whether whether the time should be assessed while executing the algorithm.
 void setVerbose(boolean verbose)
          Sets whether verbose messages should be printed while executing the algorithm.
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters, setParameters, shortDescription
 

Method Detail

run

R run(Database<O> database)
                     throws IllegalStateException
Runs the algorithm.

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).

getResult

R getResult()
Returns the result of the algorithm.

Returns:
the result of the algorithm

getDescription

Description getDescription()
Returns a description of the algorithm.

Returns:
a description of the algorithm

setVerbose

void setVerbose(boolean verbose)
Sets whether verbose messages should be printed while executing the algorithm.

Parameters:
verbose - the flag to allow verbose messages while performing the algorithm

setTime

void setTime(boolean time)
Sets whether whether the time should be assessed while executing the algorithm.

Parameters:
time - the flag to request output of performance time

Release 0.2 (2009-07-06_1820)