public class PartiteRandomGraphGenerator<V,E> extends java.lang.Object implements GraphGenerator<V,E,java.lang.Object[]>
Constructor and Description |
---|
PartiteRandomGraphGenerator(int[] numVertices,
int numEdges)
Construct a new PartiteRandomGraphGenerator for a k-partite graph.
|
PartiteRandomGraphGenerator(int numVertices1,
int numVertices2,
int numEdges)
Construct a new PartiteRandomGraphGenerator for a bipartite graph.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
VertexFactory<V> vertexFactory,
java.util.Map<java.lang.String,java.lang.Object[]> resultMap)
TODO hb 30-nov-05: document me
|
public PartiteRandomGraphGenerator(int numVertices1, int numVertices2, int numEdges)
numVertices1
- number of vertices in the first partitionnumVertices2
- number of vertices in the second partitionnumEdges
- number of edges to be generatedpublic PartiteRandomGraphGenerator(int[] numVertices, int numEdges)
numVertices
- number of vertices in the k partitionsnumEdges
- number of edges to be generated between any two partitionspublic void generateGraph(Graph<V,E> target, VertexFactory<V> vertexFactory, java.util.Map<java.lang.String,java.lang.Object[]> resultMap)
generateGraph
in interface GraphGenerator<V,E,java.lang.Object[]>
resultMap
- some array of verticestarget
- 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 elementsvertexFactory
- called to produce new verticesGraphGenerator.generateGraph(org.jgrapht.Graph<V, E>, org.jgrapht.VertexFactory<V>, java.util.Map<java.lang.String, T>)