Class MixedRandomGraphGenerator
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.generators.random.MixedRandomGraphGenerator
-
public class MixedRandomGraphGenerator extends java.lang.Object
Generates a mixed-mode random graph based on the output ofBarabasiAlbertGenerator
. Primarily intended for providing a heterogeneous sample graph for visualization testing, etc.
-
-
Constructor Summary
Constructors Constructor Description MixedRandomGraphGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V,E>
edu.uci.ics.jung.graph.Graph<V,E>generateMixedRandomGraph(org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory, java.util.Map<E,java.lang.Number> edge_weights, int num_vertices, boolean parallel, java.util.Set<V> seedVertices)
Returns a random mixed-mode graph.static <V,E>
edu.uci.ics.jung.graph.Graph<V,E>generateMixedRandomGraph(org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory, java.util.Map<E,java.lang.Number> edge_weight, int num_vertices, java.util.Set<V> seedVertices)
Equivalent togenerateMixedRandomGraph(edge_weight, num_vertices, true)
.
-
-
-
Method Detail
-
generateMixedRandomGraph
public static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateMixedRandomGraph(org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory, java.util.Map<E,java.lang.Number> edge_weight, int num_vertices, java.util.Set<V> seedVertices)
Equivalent togenerateMixedRandomGraph(edge_weight, num_vertices, true)
.
-
generateMixedRandomGraph
public static <V,E> edu.uci.ics.jung.graph.Graph<V,E> generateMixedRandomGraph(org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Graph<V,E>> graphFactory, org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory, java.util.Map<E,java.lang.Number> edge_weights, int num_vertices, boolean parallel, java.util.Set<V> seedVertices)
Returns a random mixed-mode graph. Starts with a randomly generated Barabasi-Albert (preferential attachment) generator (4 initial vertices, 3 edges added at each step, and num_vertices - 4 evolution steps). Then takes the resultant graph, replaces random undirected edges with directed edges, and assigns random weights to each edge.
-
-