edu.stanford.math.plex4.graph.random
public class KNearestNeighborsGraph extends ManifoldGraph
GraphInstanceGenerator.ImplementationType
points
graphImplementation, implementationType
Constructor and Description |
---|
KNearestNeighborsGraph(int size,
int dimension,
int k) |
Modifier and Type | Method and Description |
---|---|
protected double |
distance(double[] x,
double[] y)
This function must implement the distance function on the manifold.
|
protected void |
generatePoints()
This function must generate the set of random points on the manifold.
|
java.lang.String |
toString() |
generate, generateUniformPoints, getNearestNeighbors
initializeGraph, setImplementationType
public KNearestNeighborsGraph(int size, int dimension, int k)
protected double distance(double[] x, double[] y)
ManifoldGraph
distance
in class ManifoldGraph
x
- the first pointy
- the second pointprotected void generatePoints()
ManifoldGraph
generatePoints
in class ManifoldGraph
public java.lang.String toString()
toString
in class java.lang.Object