java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.graph.CycleDetection<T>

public class CycleDetection<T extends Comparable<T>> extends Object
  • Field Details

  • Constructor Details

    • CycleDetection

      public CycleDetection()
    • CycleDetection

      public CycleDetection(Map<T,Set<T>> graph)
    • CycleDetection

      public CycleDetection(Collection<T> nodes, Function<T,Set<T>> succesors)
  • Method Details

    • addEdge

      public void addEdge(T source, T target)
    • removeEdge

      public void removeEdge(T source, T target)
    • getGraph

      public Map<T,Set<T>> getGraph()
      Return the graph which is generated by calling addEdge(T, T) or removeEdge(T, T).
      Returns:
      the graph as a map from source to possibly multiple targets
    • getAllNodes

      private Set<T> getAllNodes()
    • getCycles

      public List<List<T>> getCycles()
    • normalizePath

      private List<T> normalizePath(List<T> list)
    • normalizePaths

      public static <T extends Comparable<T>> List<List<T>> normalizePaths(List<List<T>> paths)