|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.lazy.IBk.NeighborList
Field Summary | |
private IBk.NeighborNode |
m_First
The first node in the list |
private IBk.NeighborNode |
m_Last
The last node in the list |
private int |
m_Length
The number of nodes to attempt to maintain in the list |
Constructor Summary | |
IBk.NeighborList(int length)
Creates the neighborlist with a desired length |
Method Summary | |
int |
currentLength()
Gets the current length of the list. |
void |
insertSorted(double distance,
Instance instance)
Inserts an instance neighbor into the list, maintaining the list sorted by distance. |
boolean |
isEmpty()
Gets whether the list is empty. |
void |
printList()
Prints out the contents of the neighborlist |
void |
pruneToK(int k)
Prunes the list to contain the k nearest neighbors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private IBk.NeighborNode m_First
private IBk.NeighborNode m_Last
private int m_Length
Constructor Detail |
public IBk.NeighborList(int length)
length
- the length of list to attempt to maintainMethod Detail |
public boolean isEmpty()
public int currentLength()
public void insertSorted(double distance, Instance instance)
distance
- the distance to the instanceinstance
- the neighboring instancepublic void pruneToK(int k)
k
- the number of neighbors to keep in the list.public void printList()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |