Package com.jgalgo.gen
Interface GraphGenerator<V,E>
- Type Parameters:
V
- the vertices typeE
- the edges type
- All Known Implementing Classes:
BarabasiAlbertGraphGenerator
,ComplementGraphGenerator
,CompleteBipartiteGraphGenerator
,CompleteGraphGenerator
,DifferenceGraphGenerator
,EmptyGraphGenerator
,GnmBipartiteGraphGenerator
,GnmGraphGenerator
,GnpBipartiteGraphGenerator
,GnpGraphGenerator
,IntersectionGraphGenerator
,LineGraphGenerator
,RecursiveMatrixGraphGenerator
,SymmetricDifferenceGraphGenerator
,UniformTreeGenerator
,UnionGraphGenerator
public interface GraphGenerator<V,E>
A generator of graphs.
The generator can be used to generate with different distributions and structures. A generator may be used to generate only trees, only bipartite graphs, dense or sparse graphs, etc.
- Author:
- Barak Ugav
-
Method Summary
Modifier and TypeMethodDescriptiongenerate()
Generates an immutable graph.Generates a graph into a builder.Generates a mutable graph.
-
Method Details
-
generate
Generates an immutable graph.For mutable graphs use
generateMutable()
.- Returns:
- a new immutable graph generated with the generator parameters
-
generateMutable
Generates a mutable graph.For immutable graphs use
generate()
.- Returns:
- a new mutable graph generated with the generator parameters
-
generateIntoBuilder
GraphBuilder<V,E> generateIntoBuilder()Generates a graph into a builder.This is the a more flexible way to generate a graph. The builder can be used to generate a mutable or immutable graph, or to add additional vertices or edges on top of the generated ones.
- Returns:
- a new graph builder populated by the generator with the generator parameters
-