Package org.graph4j.generators
Class CompleteMultipartiteGenerator
java.lang.Object
org.graph4j.generators.AbstractGraphGenerator
org.graph4j.generators.RandomMultipartiteGenerator
org.graph4j.generators.CompleteMultipartiteGenerator
Generator for complete multipartite graphs.
A complete k-partite graph is a graph whose vertices can be
decomposed into k disjoint stable sets (no two vertices within the same set
are adjacent) and every pair of graph vertices in distinct stable sets are
adjacent.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.generators.RandomMultipartiteGenerator
edgeProbability, numVertices, stableSetsFields inherited from class org.graph4j.generators.AbstractGraphGenerator
vertices -
Constructor Summary
ConstructorsConstructorDescriptionCompleteMultipartiteGenerator(int... numVertices) Creates a generator for a complete multipartite graph, where the number of vertices of each stable set is specified. -
Method Summary
Methods inherited from class org.graph4j.generators.RandomMultipartiteGenerator
getStableSetsMethods inherited from class org.graph4j.generators.AbstractGraphGenerator
addRandomEdges
-
Constructor Details
-
CompleteMultipartiteGenerator
public CompleteMultipartiteGenerator(int... numVertices) Creates a generator for a complete multipartite graph, where the number of vertices of each stable set is specified.- Parameters:
numVertices- the number of vertices in each stable set.
-
-
Method Details
-
create
Creates a complete multipartite graph.- Overrides:
createin classRandomMultipartiteGenerator- Returns:
- a complete multipartite graph
-