V
- the graph vertex typeE
- the graph edge typepublic class ScaleFreeGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
Constructor and Description |
---|
ScaleFreeGraphGenerator(int size)
Constructs a new ScaleFreeGraphGenerator.
|
ScaleFreeGraphGenerator(int size,
long seed)
Constructs a new ScaleFreeGraphGenerator using fixed
seed for the random generator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
VertexFactory<V> vertexFactory,
Map<String,V> resultMap)
Generates scale-free network with size passed to the constructor.
|
public ScaleFreeGraphGenerator(int size)
size
- number of vertices to be generatedpublic ScaleFreeGraphGenerator(int size, long seed)
size
- number of vertices to be generatedseed
- initial seed for the random generatorpublic void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, Map<String,V> resultMap)
generateGraph
in interface GraphGenerator<V,E,V>
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 elementsvertexFactory
- called to produce new verticesresultMap
- unused parameterCopyright © 2016. All rights reserved.