index
Class Term

java.lang.Object
  extended byindex.Term

public class Term
extends java.lang.Object

A bean containing the value and the frequency of one one fingerprint. We always have them as a list which is assigned to a document or a finger print.


Field Summary
(package private)  float frequency
          The frequency of it in the meant document
(package private)  java.lang.Integer id
          Value of the fingerprint
 
Constructor Summary
Term(Fingerprint fp)
           
Term(java.lang.Integer id, float frequency)
           
 
Method Summary
 boolean equals(java.lang.Object arg0)
           
 float getFrequency()
           
 java.lang.Integer getId()
           
 int hashCode()
           
 void incFrequency()
           
 void merge(Term other, int first, int second)
          Merging the two terms and obtaining the mean value used to obtain the centroid of the merged clusters.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

java.lang.Integer id
Value of the fingerprint


frequency

float frequency
The frequency of it in the meant document

Constructor Detail

Term

public Term(Fingerprint fp)

Term

public Term(java.lang.Integer id,
            float frequency)
Method Detail

merge

public void merge(Term other,
                  int first,
                  int second)
           throws TermIDConflict
Merging the two terms and obtaining the mean value used to obtain the centroid of the merged clusters. In the computation of centroid the size of each cluster is important to let the bigger cluster have more effect.

Parameters:
other - the other term to be merged with
first - the weight of the first cluster => number of documents
second - the weight of the second cluster => number of documents
Throws:
TermIDConflict - the terms must have similar IDs

getId

public java.lang.Integer getId()

getFrequency

public float getFrequency()

incFrequency

public void incFrequency()

equals

public boolean equals(java.lang.Object arg0)

hashCode

public int hashCode()

toString

public java.lang.String toString()