cs195z.cluster
Class CStudentCAST<T extends Number,E extends Serializable>

java.lang.Object
  extended by cs195z.support.CAbstractAlgorithm<T,E>
      extended by cs195z.cluster.CStudentCAST<T,E>
All Implemented Interfaces:
CAlgorithm<T,E>, Runnable

public class CStudentCAST<T extends Number,E extends Serializable>
extends CAbstractAlgorithm<T,E>

Comments

Author:
[your login]

Constructor Summary
CStudentCAST(List<CElement<T,E>> items, double theta, WeightedGraph<CElement<T,E>,DefaultWeightedEdge> g)
          Please do not modify this constructor.
 
Method Summary
 Iterable<Iterable<CElement<T,E>>> getResult()
          The standard issue method is probably ok, assuming you assign an Iterable>> to _result.
 void init()
          Does all of the work of the algorithm before the main loop.
 boolean step()
          Performs the main iteration of the algorithm.
 
Methods inherited from class cs195z.support.CAbstractAlgorithm
clickStepped, complete, run
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CStudentCAST

public CStudentCAST(List<CElement<T,E>> items,
                    double theta,
                    WeightedGraph<CElement<T,E>,DefaultWeightedEdge> g)
Please do not modify this constructor. It retains your parameters.

Parameters:
items - - set of elements to cluster
theta - - measure of "closeness"
g - - a WeightedGraph, see the org.jgrapht.graph package
Method Detail

init

public void init()
Description copied from interface: CAlgorithm
Does all of the work of the algorithm before the main loop. Predominantly preprocessing.


step

public boolean step()
Description copied from interface: CAlgorithm
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

public Iterable<Iterable<CElement<T,E>>> getResult()
The standard issue method is probably ok, assuming you assign an Iterable>> to _result. This could be a LinkedList of LinkedLists for example.

Returns:
an iterable of clusters that has an iterable collection of elements