Class HavelHakimiBipartiteRealization

java.lang.Object
org.graph4j.realization.HavelHakimiBipartiteRealization
All Implemented Interfaces:
BipartiteRealizationAlgorithm

public class HavelHakimiBipartiteRealization extends Object implements BipartiteRealizationAlgorithm
This class provides a method to generate a bipartite graph from a given sequence of degrees, using an adaptation of the Havel-Hakimi algorithm. The time complexity is O(n^2 log n), where n is the number of vertices.
Author:
Cristian Frăsinaru
See Also:
  • Constructor Details

    • HavelHakimiBipartiteRealization

      public HavelHakimiBipartiteRealization(int[] leftDegrees, int[] rightDegrees)
      Creates an algorithm for the bipartite realization problem.
      Parameters:
      leftDegrees - the degrees of the vertices on the left side.
      rightDegrees - the degrees of the vertices on the right side.
  • Method Details