de.aitools.iv.graphdrawing.datastructures.graph.algorithms
Class KNearestNeighbor
java.lang.Object
de.aitools.iv.graphdrawing.datastructures.graph.algorithms.KNearestNeighbor
- All Implemented Interfaces:
- GraphProcedure
public class KNearestNeighbor
- extends java.lang.Object
- implements GraphProcedure
implements an algorithm to compute the k nearest neighbor
graph of a weighted graph.
NOTE: if the weight of the k-th edge occurs several times
in the list of a node's incident edges (a tie), all these occurrences
are treated as to be retained.
TODO: Introduce tie-handling as an option.
- Author:
- tim.gollub@medien.uni-weimar.de
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MUTUAL
public static final int MUTUAL
- See Also:
- Constant Field Values
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
KNearestNeighbor
public KNearestNeighbor()
KNearestNeighbor
public KNearestNeighbor(int k,
int mode)
setProperties
public void setProperties(int k,
int mode)
computeKNNGraph
public void computeKNNGraph(WeightedGraph graph,
int k)
computeMutualKNNGraph
public void computeMutualKNNGraph(WeightedGraph graph,
int k)
execute
public java.lang.Object execute(WeightedGraph g)
- Specified by:
execute
in interface GraphProcedure