package de.lmu.ifi.dbs.algorithm;

import de.lmu.ifi.dbs.algorithm.result.Result;
import de.lmu.ifi.dbs.data.MetricalObject;
import de.lmu.ifi.dbs.database.Database;
import de.lmu.ifi.dbs.normalization.Normalization;
import de.lmu.ifi.dbs.utilities.Description;
import de.lmu.ifi.dbs.utilities.optionhandling.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 that any implementation is supposed to provide a constructor without parameters.
 * 
 * @author Arthur Zimek (<a href="mailto:zimek@dbs.ifi.lmu.de">zimek@dbs.ifi.lmu.de</a>)
 */
public interface Algorithm<T extends MetricalObject> extends Parameterizable
{
    /**
     * Runs the algorithm.
     * 
     * @param database the database to run the algorithm on
     * @throws IllegalStateException if the algorithm has not been initialized properly
     * (e.g. the setParameters(String[]) method has been failed to be called).
     */
    void run(Database<T> database) throws IllegalStateException;
    
    /**
     * Returns the result of the algorithm.
     * 
     * @return the result of the algorithm
     */
    Result getResult();
    
    /**
     * Returns a description of the algorithm.
     * 
     * 
     * @return a description of the algorithm
     */
    Description getDescription();
}

@@ -163,59 +163,8 @@
 se;%0A
-import de.lmu.ifi.dbs.normalization.Normalization;%0A
 impo
@@ -204,16 +204,16 @@
 iption;%0A
+
 import d
@@ -364,24 +364,28 @@
 n class.%0A * 
+%3Cp/%3E
 %0A * Any impl
@@ -584,24 +584,28 @@
 pecific.%0A * 
+%3Cp/%3E
 %0A * Note tha
@@ -684,17 +684,16 @@
 ters.%0A *
- 
 %0A * @aut
@@ -858,21 +858,17 @@
 able
-%0A
+ 
 %7B%0A  
- 
- 
 /**%0A
-  
    *
@@ -887,31 +887,26 @@
 gorithm.%0A   
-  * %0A  
+*%0A
    * @param 
@@ -954,18 +954,16 @@
 m on%0A   
- 
- 
 * @throw
@@ -1040,19 +1040,47 @@
 erly%0A   
+*                            
   
-*
  (e.g. t
@@ -1147,25 +1147,21 @@
 ed).%0A   
-  
 */%0A  
- 
- 
 void run
@@ -1213,31 +1213,23 @@
 eption;%0A
-    %0A 
+%0A
   
- 
 /**%0A
-  
    * Ret
@@ -1261,34 +1261,29 @@
 gorithm.%0A   
-  * 
+*
 %0A   
-  
 * @return th
@@ -1315,23 +1315,19 @@
 %0A   
-  
 */%0A
-  
   Result
  get
@@ -1322,16 +1322,19 @@
   Result
+%3CT%3E
  getResu
@@ -1343,23 +1343,15 @@
 ();%0A
-    %0A 
+%0A
   
- 
 /**%0A
-  
    *
@@ -1398,23 +1398,10 @@
 %0A   
-  * %0A     * %0A  
+*%0A
    *
@@ -1443,23 +1443,19 @@
 ithm%0A   
-  
 */%0A
-  
   Descri

return type getResult