public class NeighborList extends SynchronizedBoundedPriorityQueue<Neighbor> implements Serializable
| Constructor and Description |
|---|
NeighborList(int size)
Create a new neighborlist of given size.
|
NeighborList(NeighborList origin)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
containsNode(T node)
Returns true if this neighborlist contains a neighbor corresponding to
this node.
|
int |
countCommonNodes(NeighborList other_nl)
Count the nodes (based on node.id) that are present in both
neighborlists.
|
int |
countCommons(NeighborList other)
Count the number of equivalent neighbors (using similarities).
|
void |
prune(double threshold)
Remove all neighbors with similarity inferior to threshold.
|
<T> boolean |
removeNode(T node)
Remove from the neighborlist the neighbor corresponding to this node.
|
add, addAll, clear, contains, containsAll, element, equals, hashCode, isEmpty, iterator, offer, peek, poll, remove, remove, removeAll, retainAll, size, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitparallelStream, removeIf, spliterator, streampublic NeighborList(NeighborList origin)
origin - public NeighborList(int size)
size - size of the neighborlistpublic final int countCommonNodes(NeighborList other_nl)
other_nl - public final int countCommons(NeighborList other)
other - public final <T> boolean containsNode(T node)
node - public final <T> boolean removeNode(T node)
node - public final void prune(double threshold)
threshold - Copyright © 2017. All rights reserved.