Class AcyclicOrientation

java.lang.Object
org.graph4j.SimpleGraphAlgorithm
org.graph4j.ordering.AcyclicOrientation

public class AcyclicOrientation extends SimpleGraphAlgorithm
An acyclic orientation of an undirected graph is an assignment of a direction to each edge (an orientation) that does not form any directed cycle and therefore makes it into a directed acyclic graph. Every graph has an acyclic orientation.
Author:
Cristian Frăsinaru
  • Constructor Details

    • AcyclicOrientation

      public AcyclicOrientation(Graph graph)
      Parameters:
      graph - the input undirected graph.
    • AcyclicOrientation

      public AcyclicOrientation(Graph graph, int[] vertexOrdering)
      Parameters:
      graph - the input undirected graph.
      vertexOrdering - an ordering of the graph vertices.
  • Method Details

    • create

      public Digraph create()
      Returns:
      A directed acyclic graph, corresponding to the input graph.