mev-4.0.01/source/org/tigr/microarray/mev/cluster/algorithm/Algorithm.java

Code
Comments
Other
Rev Date Author Line
2 26 Feb 07 jari 1 /*
2 26 Feb 07 jari 2 Copyright @ 1999-2003, The Institute for Genomic Research (TIGR).
2 26 Feb 07 jari 3 All rights reserved.
2 26 Feb 07 jari 4 */
2 26 Feb 07 jari 5 /*
2 26 Feb 07 jari 6  * $RCSfile: Algorithm.java,v $
2 26 Feb 07 jari 7  * $Revision: 1.3 $
2 26 Feb 07 jari 8  * $Date: 2005/03/10 15:46:10 $
2 26 Feb 07 jari 9  * $Author: braistedj $
2 26 Feb 07 jari 10  * $State: Exp $
2 26 Feb 07 jari 11  */
2 26 Feb 07 jari 12 package org.tigr.microarray.mev.cluster.algorithm;
2 26 Feb 07 jari 13
2 26 Feb 07 jari 14 /**
2 26 Feb 07 jari 15  * Interface of a class which is used to proceed a calculation.
2 26 Feb 07 jari 16  *
2 26 Feb 07 jari 17  * @version 1.0
2 26 Feb 07 jari 18  * @author Aleksey D.Rezantsev
2 26 Feb 07 jari 19  */
2 26 Feb 07 jari 20 public interface Algorithm {
2 26 Feb 07 jari 21     
2 26 Feb 07 jari 22     // distance functions constants
2 26 Feb 07 jari 23     public static final int DEFAULT = 0;
2 26 Feb 07 jari 24     public static final int PEARSON = 1;
2 26 Feb 07 jari 25     public static final int COSINE = 2;
2 26 Feb 07 jari 26     public static final int COVARIANCE = 3;
2 26 Feb 07 jari 27     public static final int EUCLIDEAN = 4;
2 26 Feb 07 jari 28     public static final int DOTPRODUCT = 5;
2 26 Feb 07 jari 29     public static final int PEARSONUNCENTERED = 6;
2 26 Feb 07 jari 30     public static final int PEARSONSQARED = 7;
2 26 Feb 07 jari 31     public static final int MANHATTAN = 8;
2 26 Feb 07 jari 32     public static final int SPEARMANRANK = 9;
2 26 Feb 07 jari 33     public static final int KENDALLSTAU = 10;
2 26 Feb 07 jari 34     public static final int MUTUALINFORMATION = 11;
2 26 Feb 07 jari 35     
2 26 Feb 07 jari 36     /**
2 26 Feb 07 jari 37      * This method execute calculation and return result,
2 26 Feb 07 jari 38      * stored in <code>AlgorithmData</code> class.
2 26 Feb 07 jari 39      *
2 26 Feb 07 jari 40      * @param data the data to be calculated.
2 26 Feb 07 jari 41      */
2 26 Feb 07 jari 42     public AlgorithmData execute(AlgorithmData data) throws AlgorithmException;
2 26 Feb 07 jari 43     
2 26 Feb 07 jari 44     /**
2 26 Feb 07 jari 45      * This method should interrupt the calculation.
2 26 Feb 07 jari 46      */
2 26 Feb 07 jari 47     public void abort();
2 26 Feb 07 jari 48     
2 26 Feb 07 jari 49     /**
2 26 Feb 07 jari 50      * Adds an <code>AlgorithmListener</code> to this <code>Algorithm</code>.
2 26 Feb 07 jari 51      *
2 26 Feb 07 jari 52      * @param l the <code>AlgorithmListener</code> to be added.
2 26 Feb 07 jari 53      */
2 26 Feb 07 jari 54     public void addAlgorithmListener(AlgorithmListener l);
2 26 Feb 07 jari 55     
2 26 Feb 07 jari 56     /**
2 26 Feb 07 jari 57      * Removes an <code>AlgorithmListener</code> from this <code>Algorithm</code>.
2 26 Feb 07 jari 58      *
2 26 Feb 07 jari 59      * @param l the <code>AlgorithmListener</code> to be removed.
2 26 Feb 07 jari 60      */
2 26 Feb 07 jari 61     public void removeAlgorithmListener(AlgorithmListener l);
2 26 Feb 07 jari 62 }