public class RandGenerator<V,E>
extends java.lang.Object
Constructor and Description |
---|
RandGenerator() |
Modifier and Type | Method and Description |
---|---|
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateBarabasiAlbertGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int n,
int e,
int steps)
This method generates Barabasi-Albert power law graph.
|
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateEppsteinGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int n,
int e,
int i)
This method generates Eppstein power law graph.
|
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateErdosRenyiGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int n,
double p) |
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateKleinbergSWGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int width,
int height,
int p,
int q,
double r) |
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateRandomRegularGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int n,
int d)
This method generates a random regular graph.
|
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
generateWattsStrogatzSWGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory,
int n,
int k,
double p) |
public static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateErdosRenyiGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int n, double p)
V
- E
- graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factoryn
- number of verticesp
- probability of connectedness (between 0.0 and 1.0)public static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateEppsteinGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int n, int e, int i)
graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factoryn
- number of verticese
- number of edgesi
- the number of iterations to use: the larger the value the better the graph's degree distribution will approximate a power-lawpublic static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateBarabasiAlbertGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int n, int e, int steps) throws java.lang.Exception
graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factoryn
- amount of nodese
- the number of edges that should be attached from the new vertex to pre-existing vertices at each time stepsteps
- number of steps to iteratejava.lang.Exception
- if too many edges are requested to addpublic static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateKleinbergSWGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int width, int height, int p, int q, double r)
V
- E
- graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factorywidth
- the width of the grid (in number of vertices)height
- the height of the grid (in number of vertices)p
- Manhattan distance of the all nodes to connect to the neighbors of a node vr
- A constant to manage the probability of connecting a node v to a long distance nodeq
- The number of long distance neighbors of vpublic static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateWattsStrogatzSWGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int n, int k, double p) throws java.lang.Exception
V
- E
- graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factoryn
- number of verticesk
- mean degree of the graphp
- probability of rewiring an edgejava.lang.Exception
- when the probability is not in [0,1]public static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateRandomRegularGraph(org.apache.commons.collections15.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory, int n, int d)
graphFactory
- graph factoryvertexFactory
- vertex factoryedgeFactory
- edge factoryn
- number of verticesd
- degree of the graph