public class EppsteinPowerLawGenerator<V,E> extends Object implements GraphGenerator<V,E>
Constructor and Description |
---|
EppsteinPowerLawGenerator(org.apache.commons.collections4.Factory<Graph<V,E>> graphFactory,
org.apache.commons.collections4.Factory<V> vertexFactory,
org.apache.commons.collections4.Factory<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> |
create()
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(org.apache.commons.collections4.Factory<Graph<V,E>> graphFactory, org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory, int numVertices, int numEdges, int r)
graphFactory
- the factory to use to generate the graphvertexFactory
- the factory to use to create verticesedgeFactory
- the factory 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 © 2014. All rights reserved.