Package com.jgalgo.gen
Interface GraphGenerator<V,E>
-
- Type Parameters:
V- the vertices typeE- the edges type
- All Known Implementing Classes:
BarabasiAlbertGraphGenerator,CompleteGraphGenerator,EmptyGraphGenerator,GnpGraphGenerator,RecursiveMatrixGraphGenerator
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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Graph<V,E>generate()Generates an immutable graph.GraphBuilder<V,E>generateIntoBuilder()Generates a graph into a builder.default Graph<V,E>generateMutable()Generates a mutable graph.
-
-
-
Method Detail
-
generate
default Graph<V,E> generate()
Generates an immutable graph.For mutable graphs use
generateMutable().- Returns:
- a new immutable graph generated with the generator parameters
-
generateMutable
default Graph<V,E> 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
-
-