Package org.graph4j.generators
Class AbstractBipartiteGenerator
java.lang.Object
org.graph4j.generators.AbstractGraphGenerator
org.graph4j.generators.AbstractBipartiteGenerator
- Direct Known Subclasses:
CompleteBipartiteGenerator,RandomGnmBipartiteGenerator,RandomGnpBipartiteGenerator
- Author:
- Cristian Frăsinaru
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected final intprotected final intFields inherited from class org.graph4j.generators.AbstractGraphGenerator
vertices -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBipartiteGenerator(int n1, int n2) AbstractBipartiteGenerator(int first1, int last1, int first2, int last2) -
Method Summary
Methods inherited from class org.graph4j.generators.AbstractGraphGenerator
addRandomEdges
-
Field Details
-
first1
protected final int first1 -
last1
protected final int last1 -
first2
protected final int first2 -
last2
protected final int last2
-
-
Constructor Details
-
AbstractBipartiteGenerator
public AbstractBipartiteGenerator(int n1, int n2) - Parameters:
n1- the number of vertices in the left side.n2- the number of vertices in the right side.
-
AbstractBipartiteGenerator
public AbstractBipartiteGenerator(int first1, int last1, int first2, int last2) - Parameters:
first1- the number of first vertex in the left side.last1- the number of last vertex in the left side.first2- the number of first vertex in the right side.last2- the number of last vertex in the right side.
-
-
Method Details
-
createGraph
- Returns:
- a bipartite graph.
-
createDigraph
- Parameters:
leftToRight-trueit the edges are to be oriented from left to right,falsefor right to left ornullfor a random orientation.- Returns:
- a bipartite digraph, with the given edge orientation.
-
addEdges
-