public class KleinbergSmallWorldGenerator<V,E> extends Lattice2DGenerator<V,E>
col_count, edge_factory, graph_factory, is_directed, is_toroidal, row_count, vertex_factory
Constructor and Description |
---|
KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory,
org.apache.commons.collections4.Factory<V> vertex_factory,
org.apache.commons.collections4.Factory<E> edge_factory,
int latticeSize,
double clusteringExponent)
Creates
|
KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory,
org.apache.commons.collections4.Factory<V> vertex_factory,
org.apache.commons.collections4.Factory<E> edge_factory,
int row_count,
int col_count,
double clusteringExponent) |
KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory,
org.apache.commons.collections4.Factory<V> vertex_factory,
org.apache.commons.collections4.Factory<E> edge_factory,
int row_count,
int col_count,
double clusteringExponent,
boolean isToroidal) |
Modifier and Type | Method and Description |
---|---|
Graph<V,E> |
create()
Generates a random small world network according to the parameters given
|
int |
getConnectionCount()
Returns the number of new 'small-world' connections to be made to each vertex.
|
void |
setConnectionCount(int num_connections)
Sets the number of new 'small-world' connections (outgoing edges) to be added to each vertex.
|
void |
setRandom(Random random)
Sets the
Random instance used by this instance. |
void |
setRandomSeed(long seed)
Sets the seed of the internal random number generator.
|
getCol, getGridEdgeCount, getIndex, getRow, getVertex, getVertex, mod
public KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory, org.apache.commons.collections4.Factory<V> vertex_factory, org.apache.commons.collections4.Factory<E> edge_factory, int latticeSize, double clusteringExponent)
graph_factory
- vertex_factory
- edge_factory
- latticeSize
- clusteringExponent
- public KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory, org.apache.commons.collections4.Factory<V> vertex_factory, org.apache.commons.collections4.Factory<E> edge_factory, int row_count, int col_count, double clusteringExponent)
graph_factory
- vertex_factory
- edge_factory
- row_count
- col_count
- clusteringExponent
- public KleinbergSmallWorldGenerator(org.apache.commons.collections4.Factory<? extends Graph<V,E>> graph_factory, org.apache.commons.collections4.Factory<V> vertex_factory, org.apache.commons.collections4.Factory<E> edge_factory, int row_count, int col_count, double clusteringExponent, boolean isToroidal)
graph_factory
- vertex_factory
- edge_factory
- row_count
- col_count
- clusteringExponent
- isToroidal
- public void setRandom(Random random)
Random
instance used by this instance. Useful for
unit testing.public void setRandomSeed(long seed)
public void setConnectionCount(int num_connections)
public int getConnectionCount()
Copyright © 2015. All rights reserved.