|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.generators.Lattice2DGenerator<V,E>
edu.uci.ics.jung.algorithms.generators.random.KleinbergSmallWorldGenerator<V,E>
public class KleinbergSmallWorldGenerator<V,E>
Graph generator that produces a random graph with small world properties. The underlying model is an mxn (optionally toroidal) lattice. Each node u has four local connections, one to each of its neighbors, and in addition 1+ long range connections to some node v where v is chosen randomly according to probability proportional to d^-alpha where d is the lattice distance between u and v and alpha is the clustering exponent.
Field Summary |
---|
Fields inherited from class edu.uci.ics.jung.algorithms.generators.Lattice2DGenerator |
---|
col_count, edge_factory, graph_factory, is_directed, is_toroidal, row_count, vertex_factory |
Constructor Summary | |
---|---|
KleinbergSmallWorldGenerator(
Creates |
|
KleinbergSmallWorldGenerator(
|
|
KleinbergSmallWorldGenerator(
|
Method Summary | |
---|---|
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. |
Methods inherited from class edu.uci.ics.jung.algorithms.generators.Lattice2DGenerator |
---|
getCol, getGridEdgeCount, getIndex, getRow, getVertex, getVertex, mod |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KleinbergSmallWorldGenerator(graph_factory, vertex_factory, edge_factory, int latticeSize, double clusteringExponent)
graph_factory
- vertex_factory
- edge_factory
- latticeSize
- clusteringExponent
- public KleinbergSmallWorldGenerator(graph_factory, vertex_factory, edge_factory, int row_count, int col_count, double clusteringExponent)
graph_factory
- vertex_factory
- edge_factory
- row_count
- col_count
- clusteringExponent
- public KleinbergSmallWorldGenerator(graph_factory, vertex_factory, edge_factory, int row_count, int col_count, double clusteringExponent, boolean isToroidal)
graph_factory
- vertex_factory
- edge_factory
- row_count
- col_count
- clusteringExponent
- isToroidal
- Method Detail |
---|
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()
public Graph<V,E> create()
create
in class Lattice2DGenerator<V,E>
edu.uci.ics.jung.algorithms.generators.GraphGenerator#create()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |