cs195z.support
Interface CAlgorithm<T extends Number,E extends Serializable>

All Superinterfaces:
Runnable
All Known Implementing Classes:
CAbstractAlgorithm, CStudentCAST, CStudentKMeans

public interface CAlgorithm<T extends Number,E extends Serializable>
extends Runnable


Method Summary
 void clickStepped()
           
 void complete()
           
 Iterable<Iterable<CElement<T,E>>> getResult()
          Returns an iterable set of clusters, each of which is an iterable collection of elements.
 void init()
          Does all of the work of the algorithm before the main loop.
 void run()
           
 boolean step()
          Performs the main iteration of the algorithm.
 

Method Detail

step

boolean step()
Performs the main iteration of the algorithm. Exactly once.

Returns:
true if the algorithm is not complete, false if you have hit a termination condition

getResult

Iterable<Iterable<CElement<T,E>>> getResult()
Returns an iterable set of clusters, each of which is an iterable collection of elements.


init

void init()
Does all of the work of the algorithm before the main loop. Predominantly preprocessing.


run

void run()
Specified by:
run in interface Runnable

clickStepped

void clickStepped()

complete

void complete()