V
- the graph vertex typeE
- the graph edge typepublic class GnpRandomBipartiteGraphGenerator<V,E> extends Object implements GraphGenerator<V,E,V>
GnmRandomBipartiteGraphGenerator
Constructor and Description |
---|
GnpRandomBipartiteGraphGenerator(int n1,
int n2,
double p)
Create a new random bipartite graph generator.
|
GnpRandomBipartiteGraphGenerator(int n1,
int n2,
double p,
long seed)
Create a new random bipartite graph generator.
|
GnpRandomBipartiteGraphGenerator(int n1,
int n2,
double p,
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
public GnpRandomBipartiteGraphGenerator(int n1, int n2, double p)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionp
- edge probabilitypublic GnpRandomBipartiteGraphGenerator(int n1, int n2, double p, long seed)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionp
- edge probabilityseed
- seed for the random number generatorpublic GnpRandomBipartiteGraphGenerator(int n1, int n2, double p, Random rng)
n1
- number of vertices of the first partitionn2
- number of vertices of the second partitionp
- edge probabilityrng
- 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 © 2019. All rights reserved.