de.unibi.techfak.jpredictor.clustering
Interface Computable

All Known Implementing Classes:
EuclideanDistance, LikelihoodMeasure, ManhattanDistance, MatrixAlignment, MatrixDistance, MatrixLikelihood, MatrixLoglikelihood, MatrixRelationMeasure, MatrixSimilarity, MinkowskiDistance, MotifAlignment, MultiMotifAlignment, RelationMeasure, SingleMotifAlignment, VectorRelationMeasure

public interface Computable

Interface to provide a compute method and constants to handle its return value. Note, that the purpose of this class is to wrap large computations, that cannot be done in a simple method call, but rather need a stand-alone thread.


Field Summary
static int COMPUTATION_FAILED
          The computation process failed in one step and is not running anymore.
static int COMPUTATION_PENDING
          The computation is still running and computing.
static int COMPUTATION_SUCCESS
          The computation has finished successfully.
static int COMPUTATION_WAITING
          The computation process is not running at the moment but is not stopped either.
 
Method Summary
 int compute()
          Uses all internal informations available and starts and controlls the computational process.
 

Field Detail

COMPUTATION_SUCCESS

static final int COMPUTATION_SUCCESS
The computation has finished successfully. This constant is zero. All other COMPUTATION constants have values other than zero.

See Also:
Constant Field Values

COMPUTATION_WAITING

static final int COMPUTATION_WAITING
The computation process is not running at the moment but is not stopped either. This value is used to state that from outside the process was somehow halted and is now waiting to resume its activity.

See Also:
Constant Field Values

COMPUTATION_PENDING

static final int COMPUTATION_PENDING
The computation is still running and computing. Check back later whether it has finished.

See Also:
Constant Field Values

COMPUTATION_FAILED

static final int COMPUTATION_FAILED
The computation process failed in one step and is not running anymore. Check parameters and memory consumption and then restart the computation.

See Also:
Constant Field Values
Method Detail

compute

int compute()
Uses all internal informations available and starts and controlls the computational process. In its simplest case it is a method to calculate a formula, a more complicate way would be to run e.g. a whole clustering through this method.

Returns:
A status code about the process, e.g. COMPUTATION_SUCCESS.
See Also:
COMPUTATION_SUCCESS, COMPUTATION_FAILED