jInfer

cz.cuni.mff.ksi.jinfer.twostep.clustering
Class Cluster<T>

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.twostep.clustering.Cluster<T>

public class Cluster<T>
extends Object

Class representing one cluster. Holds all members and representative.


Constructor Summary
Cluster()
          Initialize with no representative and no members.
Cluster(T representant)
          Initialize with one member.
 
Method Summary
 void add(T item)
          Add item to cluster.
 Set<T> getMembers()
          Get members.
 T getRepresentant()
          Get representative.
 Boolean isMember(T item)
          True if item is member of this cluster.
 void setRepresentant(T representant)
          Set representative.
 int size()
          Get cluster size.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cluster

public Cluster()
Initialize with no representative and no members.


Cluster

public Cluster(T representant)
Initialize with one member.

Parameters:
representant - to be first member and representative as well
Method Detail

getRepresentant

public T getRepresentant()
Get representative.

Returns:
the representative

setRepresentant

public void setRepresentant(T representant)
Set representative.

Parameters:
representant - the representative to set

getMembers

public Set<T> getMembers()
Get members.

Returns:
the members

isMember

public Boolean isMember(T item)
True if item is member of this cluster.

Parameters:
item - item to test
Returns:
true if item is member of this cluster.

add

public void add(T item)
Add item to cluster.

Parameters:
item - item to add.

size

public int size()
Get cluster size.

Returns:
count of members.

toString

public String toString()
Overrides:
toString in class Object

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011