org.carrot2.filter.haog.fi.algorithm
Class Cluster

java.lang.Object
  extended by org.carrot2.filter.haog.fi.algorithm.Cluster

public class Cluster
extends Object

Class representing documents cluster.

Author:
Karol GoĊ‚embniak

Constructor Summary
Cluster(List description)
          Constructor for this class.
 
Method Summary
 boolean addDocument(TokenizedDocument document)
          Adds document to this cluster.
 boolean addNeighbour(Cluster cluster)
          Adds cluster to claster's neighbours list.
 List getDescription()
          Getter for description field.
 Set getDocuments()
          Getter for documents field.
 Integer getId()
          Getter for id field.
 int getIntersectionSize(Cluster cluster)
          This method gets number of common documents in this and cluster given as parameter.
 List getNeighbours()
          Getter for neighbours field.
 void setId(Integer id)
          Setter for id field.
 void setNeighbours(List neighbours)
          Setter for neighbours field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cluster

public Cluster(List description)
Constructor for this class.

Parameters:
description - - list of strings describing this cluster.
Method Detail

addDocument

public boolean addDocument(TokenizedDocument document)
Adds document to this cluster.

Parameters:
document -
Returns:
java.util.Set.add() operation result

getDescription

public List getDescription()
Getter for description field.

Returns:
list of elements describing this cluster

getDocuments

public Set getDocuments()
Getter for documents field.

Returns:
set of documents contained by this cluster

getIntersectionSize

public int getIntersectionSize(Cluster cluster)
This method gets number of common documents in this and cluster given as parameter.

Parameters:
cluster - - Cluster to get documents intersection with.
Returns:
number of common documents

getNeighbours

public List getNeighbours()
Getter for neighbours field.

Returns:
list of cluster's neighbours

setNeighbours

public void setNeighbours(List neighbours)
Setter for neighbours field.

Parameters:
neighbours - - List of cluster's neighbours

addNeighbour

public boolean addNeighbour(Cluster cluster)
Adds cluster to claster's neighbours list.

Parameters:
cluster - - Claster to add
Returns:
java.util.List.add() operation result

getId

public Integer getId()
Getter for id field.

Returns:
Cluster's identifier

setId

public void setId(Integer id)
Setter for id field.

Parameters:
id - - Cluster's identifier


Copyright (c) Dawid Weiss, Stanislaw Osinski