java.lang.Object
org.jgrapht.generate.ScaleFreeGraphGenerator<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
GraphGenerator<V,
E, V>
Generates directed or undirected
scale-free network of any
size. Scale-free network is a connected graph, where degrees of vertices are distributed in
unusual way. There are many vertices with small degrees and only small amount of vertices with
big degrees.
- Author:
- Ilya Razenshteyn
-
Constructor Summary
ConstructorDescriptionScaleFreeGraphGenerator
(int size) ConstructorScaleFreeGraphGenerator
(int size, long seed) ConstructorScaleFreeGraphGenerator
(int size, Random rng) Constructor -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.generate.GraphGenerator
generateGraph
-
Constructor Details
-
ScaleFreeGraphGenerator
public ScaleFreeGraphGenerator(int size) Constructor- Parameters:
size
- number of vertices to be generated
-
ScaleFreeGraphGenerator
public ScaleFreeGraphGenerator(int size, long seed) Constructor- Parameters:
size
- number of vertices to be generatedseed
- initial seed for the random generator
-
ScaleFreeGraphGenerator
Constructor- Parameters:
size
- number of vertices to be generatedrng
- the random number generator
-
-
Method Details
-
generateGraph
Generates scale-free network withsize
passed to the constructor.- Specified by:
generateGraph
in interfaceGraphGenerator<V,
E, V> - Parameters:
target
- receives the generated edges and vertices; if this is non-empty on entry, the result will be a disconnected graph since generated elements will not be connected to existing elementsresultMap
- unused parameter, can be null
-