package example;

import de.lmu.ifi.dbs.elki.algorithm.Algorithm;
import de.lmu.ifi.dbs.elki.data.type.TypeInformation;
import de.lmu.ifi.dbs.elki.data.type.TypeUtil;
import de.lmu.ifi.dbs.elki.database.Database;
import de.lmu.ifi.dbs.elki.result.Result;
import de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException;

/**
 * Algorithm that always causes an AbortException.
 */
public class AbortAlgorithm implements Algorithm {
  /**
   * Run the algorithm.
   *
   * Note: if you inherit from AbstractAlgorithm, you can also use signatures
   * such as {@code run(Relation<NumberVector> relation)}, which is easier to
   * use.
   */
  public Result run(Database database) {
    throw new AbortException("This 'algorithm' is always supposed to throw an exception.");
  }

  /**
   * Specify the <i>input data types</i>!
   */
  public TypeInformation[] getInputTypeRestriction() {
    return TypeUtil.array(/* e.g. TypeUtil.NUMBER_VECTOR_FIELD */);
  }
}

@@ -11,16 +11,99 @@
 ample;%0A%0A
+import de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm.Parameterizer;%0A
 import d
@@ -142,16 +142,16 @@
 orithm;%0A
-
 import d
@@ -506,16 +506,541 @@
 rithm %7B%0A
+  /**%0A   * Constructor. This constructor MUST be public, and it MUST be parameterless,%0A   * OR you need to add a %7B@link Parameterizer%7D, as detailed on:%0A   * http://elki.dbs.ifi.lmu.de/wiki/Parameterization%0A   *%0A   * Otherwise, the MiniGUI and command line cannot create this object.%0A   *%0A   * The Parameterizer contains the command-line / GUI options, and is%0A   * responsible for creating the instance if all parameters are ok.%0A   */%0A  public AbortAlgorithm(/* Read Parameterizer documentation first! */) %7B%0A    super();%0A  %7D%0A%0A
   /**%0A  
@@ -1422,17 +1422,41 @@
 ypes%3C/i%3E
-!
+ your algorithm supports.
 %0A   */%0A 

Add note about parameters.