tc
Class TCkNNListElement

java.lang.Object
  extended bytc.TCkNNListElement
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class TCkNNListElement
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

A Class to hold the results of the k-NN algorithm for one document

See Also:
Serialized Form

Field Summary
 java.util.ArrayList categoryLabels
          the index of the category
 double distance
          the distance (euclidian or cosine simlarity) to the vector to classify
private  int sortMethod
           
 
Constructor Summary
(package private) TCkNNListElement(java.util.ArrayList labels, double dist, int sortmethod)
           
 
Method Summary
 int compareTo(java.lang.Object arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

categoryLabels

public java.util.ArrayList categoryLabels
the index of the category


distance

public double distance
the distance (euclidian or cosine simlarity) to the vector to classify


sortMethod

private int sortMethod
Constructor Detail

TCkNNListElement

TCkNNListElement(java.util.ArrayList labels,
                 double dist,
                 int sortmethod)
Method Detail

compareTo

public int compareTo(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable