public class EppsteinPowerLawGenerator<V,E> extends Object implements GraphGenerator<V,E>
| Constructor and Description |
|---|
EppsteinPowerLawGenerator(com.google.common.base.Supplier<Graph<V,E>> graphFactory,
com.google.common.base.Supplier<V> vertexFactory,
com.google.common.base.Supplier<E> edgeFactory,
int numVertices,
int numEdges,
int r)
Creates an instance with the specified factories and specifications.
|
| Modifier and Type | Method and Description |
|---|---|
Graph<V,E> |
get()
Generates a graph whose degree distribution approximates a power-law.
|
protected Graph<V,E> |
initializeGraph() |
void |
setSeed(long seed)
Sets the seed for the random number generator.
|
public EppsteinPowerLawGenerator(com.google.common.base.Supplier<Graph<V,E>> graphFactory, com.google.common.base.Supplier<V> vertexFactory, com.google.common.base.Supplier<E> edgeFactory, int numVertices, int numEdges, int r)
graphFactory - the Supplier to use to generate the graphvertexFactory - the Supplier to use to create verticesedgeFactory - the Supplier to use to create edgesnumVertices - the number of vertices for the generated graphnumEdges - the number of edges the generated graph will have, should be Theta(numVertices)r - the number of iterations to use; the larger the value the better the graph's degree
distribution will approximate a power-lawCopyright © 2016. All rights reserved.