Interface GraphGenerator<V,E>

Type Parameters:
V - the vertices type
E - 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 Details

    • 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