edu.stanford.math.plex4.graph.random
public abstract class ManifoldGraph extends GraphInstanceGenerator
GraphInstanceGenerator.ImplementationType| Modifier and Type | Field and Description |
|---|---|
protected double[][] |
points |
graphImplementation, implementationType| Modifier | Constructor and Description |
|---|---|
protected |
ManifoldGraph(int size,
int dimension,
int k)
Constructor for the ManifoldGraph class.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
distance(double[] x,
double[] y)
This function must implement the distance function on the manifold.
|
AbstractUndirectedGraph |
generate() |
protected abstract void |
generatePoints()
This function must generate the set of random points on the manifold.
|
protected void |
generateUniformPoints()
This function generates points on the d-dimensional cube [0, 1]^d.
|
protected int[] |
getNearestNeighbors(int index)
This function gets the indices of the k nearest neighbors
to the point at the specified index.
|
initializeGraph, setImplementationTypeprotected ManifoldGraph(int size,
int dimension,
int k)
size - the number of points in the graphdimension - the dimension of the manifoldk - the number of points to connect topublic AbstractUndirectedGraph generate()
generate in class GraphInstanceGeneratorprotected void generateUniformPoints()
protected abstract void generatePoints()
protected abstract double distance(double[] x,
double[] y)
x - the first pointy - the second pointprotected int[] getNearestNeighbors(int index)
index - the index of the point