Class EppsteinPowerLawGenerator<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.generators.random.EppsteinPowerLawGenerator<V,E>
- All Implemented Interfaces:
com.google.common.base.Supplier<Graph<V,
,E>> GraphGenerator<V,
,E> Supplier<Graph<V,
E>>
Graph generator that generates undirected graphs with power-law degree distributions.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEppsteinPowerLawGenerator
(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. -
Method Summary
-
Field Details
-
mNumVertices
private int mNumVertices -
mNumEdges
private int mNumEdges -
mNumIterations
private int mNumIterations -
mMaxDegree
private double mMaxDegree -
mRandom
-
graphFactory
-
vertexFactory
-
edgeFactory
-
-
Constructor Details
-
EppsteinPowerLawGenerator
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) Creates an instance with the specified factories and specifications.- Parameters:
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-law
-
-
Method Details
-
initializeGraph
-
get
Generates a graph whose degree distribution approximates a power-law. -
setSeed
public void setSeed(long seed) Sets the seed for the random number generator.- Parameters:
seed
- input to the random number generator.
-