index
Class Term
java.lang.Object
index.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 |
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 |
id
java.lang.Integer id
- Value of the fingerprint
frequency
float frequency
- The frequency of it in the meant document
Term
public Term(Fingerprint fp)
Term
public Term(java.lang.Integer id,
float frequency)
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 withfirst
- the weight of the first cluster => number of documentssecond
- 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()