edu.stanford.math.plex4.graph.random
public class RandomGeometricGraph extends GraphInstanceGenerator
GraphInstanceGenerator.ImplementationType
Modifier and Type | Field and Description |
---|---|
protected int |
dimension |
protected int |
numNodes |
graphImplementation, implementationType
Constructor and Description |
---|
RandomGeometricGraph(int n,
int d,
double r) |
Modifier and Type | Method and Description |
---|---|
protected double |
distance(double[] x,
double[] y) |
AbstractUndirectedGraph |
generate() |
java.lang.String |
toString() |
initializeGraph, setImplementationType
public RandomGeometricGraph(int n, int d, double r)
n
- the number of nodesd
- the dimension of unit cube to uniformly put points inr
- the radius used to determine if an edge between points existspublic AbstractUndirectedGraph generate()
generate
in class GraphInstanceGenerator
protected double distance(double[] x, double[] y)
public java.lang.String toString()
toString
in class java.lang.Object