V
- the graph vertex typeE
- the graph edge typepublic class GnmRandomBipartiteGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
GnpRandomBipartiteGraphGenerator
Constructor and Description |
---|
GnmRandomBipartiteGraphGenerator(int n1,
int n2,
int m)
Create a new random bipartite graph generator.
|
GnmRandomBipartiteGraphGenerator(int n1,
int n2,
int m,
long seed)
Create a new random bipartite graph generator.
|
GnmRandomBipartiteGraphGenerator(int n1,
int n2,
int m,
Random rng)
Create a new random bipartite graph generator.
|
Modifier and Type | Method and Description |
---|---|
void |
generateGraph(Graph<V,E> target,
Map<String,V> resultMap)
Generates a random bipartite graph.
|
Set<V> |
getFirstPartition()
Returns the first partition of vertices in the bipartite graph.
|
Set<V> |
getSecondPartition()
Returns the second partitions of vertices in the bipartite graph.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateGraph, generateGraph, generateGraph
public GnmRandomBipartiteGraphGenerator(int n1, int n2, int m)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionm
- the number of edgespublic GnmRandomBipartiteGraphGenerator(int n1, int n2, int m, long seed)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionm
- the number of edgesseed
- seed for the random number generatorpublic GnmRandomBipartiteGraphGenerator(int n1, int n2, int m, Random rng)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionm
- the number of edgesrng
- random number generatorpublic void generateGraph(Graph<V,E> target, Map<String,V> resultMap)
generateGraph
in interface GraphGenerator<V,E,V>
target
- the target graphresultMap
- not used by this generator, can be nullpublic Set<V> getFirstPartition()
Copyright © 2018. All rights reserved.