Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm
Class MetaMultiAlgorithm<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,MultiResult>
          extended by de.lmu.ifi.dbs.elki.algorithm.MetaMultiAlgorithm<O>
Type Parameters:
O - Object class.
All Implemented Interfaces:
Algorithm<O,MultiResult>, Parameterizable

@Title(value="Meta Multi-Algorithm")
@Description(value="Used to run multiple algorithms on the same database and merge the result into one MultiResult.")
public class MetaMultiAlgorithm<O extends DatabaseObject>
extends AbstractAlgorithm<O,MultiResult>

Meta algorithm that will run multiple algorithms and join the result.

Author:
Erich Schubert

Field Summary
private  List<Algorithm<O,Result>> algorithms
          The instantiated algorithms to run.
static OptionID ALGORITHMS_ID
          Object ID for algorithms.
private  ObjectListParameter<Algorithm<O,Result>> ALGORITHMS_PARAM
          Parameter to specify the algorithm to be applied, must extend Algorithm.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
MetaMultiAlgorithm(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected  MultiResult runInTime(Database<O> database)
          The run method encapsulated in measure of runtime.
 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 class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run
 
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
 

Field Detail

ALGORITHMS_ID

public static final OptionID ALGORITHMS_ID
Object ID for algorithms.


ALGORITHMS_PARAM

private final ObjectListParameter<Algorithm<O extends DatabaseObject,Result>> ALGORITHMS_PARAM
Parameter to specify the algorithm to be applied, must extend Algorithm.

Key: -algorithms


algorithms

private List<Algorithm<O extends DatabaseObject,Result>> algorithms
The instantiated algorithms to run.

Constructor Detail

MetaMultiAlgorithm

public MetaMultiAlgorithm(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

setTime

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

Specified by:
setTime in interface Algorithm<O extends DatabaseObject,MultiResult>
Overrides:
setTime in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>
Parameters:
time - the flag to request output of performance time

setVerbose

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

Specified by:
setVerbose in interface Algorithm<O extends DatabaseObject,MultiResult>
Overrides:
setVerbose in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>
Parameters:
verbose - the flag to allow verbose messages while performing the algorithm

runInTime

protected MultiResult runInTime(Database<O> database)
                         throws IllegalStateException
Description copied from class: AbstractAlgorithm
The run method encapsulated in measure of runtime. An extending class needs not to take care of runtime itself.

Specified by:
runInTime in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>
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)