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)
Constructor
|
ScaleFreeGraphGenerator(int size,
long seed)
Constructor
|
ScaleFreeGraphGenerator(int size,
Random rng)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
Map<String,V> resultMap)
Generates scale-free network with size passed to the constructor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateGraph
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 ScaleFreeGraphGenerator(int size, Random rng)
size
- number of vertices to be generatedrng
- the random number generatorpublic void generateGraph(Graph<V,E> target, 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 elementsresultMap
- unused parameter, can be nullCopyright © 2019. All rights reserved.