cs195z.support
Class CUtils

java.lang.Object
  extended by cs195z.support.CUtils

public class CUtils
extends Object


Nested Class Summary
static class CUtils.Algorithms
           
 
Constructor Summary
CUtils()
          Constructs the GUI for running CAlgorithms.
 
Method Summary
static
<T extends Number,E extends Serializable>
double
distance(CElement<T,E> c1, CElement<T,E> c2)
          Gives the Euclidean distance between two CElements
static void main(String[] args)
          Can be run without arguments.
static
<T extends Number,E extends Serializable>
void
printClusters(Iterable<Iterable<CElement<T,E>>> clusters)
          Prints clusters at the end of execution of algorithm.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CUtils

public CUtils()
Constructs the GUI for running CAlgorithms.

Method Detail

distance

public static <T extends Number,E extends Serializable> double distance(CElement<T,E> c1,
                                                                        CElement<T,E> c2)
Gives the Euclidean distance between two CElements

Parameters:
c1 - any CElement
c2 - any CElement
Returns:
Euclidean distance as double-precision float

printClusters

public static <T extends Number,E extends Serializable> void printClusters(Iterable<Iterable<CElement<T,E>>> clusters)
Prints clusters at the end of execution of algorithm.

Parameters:
clusters - corresponds to _result in algorithm

main

public static void main(String[] args)
Can be run without arguments.

Parameters:
args - none