Class SymmetricAcyclicGraphChecker<V,​EX extends Exception>

  • All Implemented Interfaces:
    GraphChecker<EX>

    public class SymmetricAcyclicGraphChecker<V,​EX extends Exception>
    extends Object
    implements GraphChecker<EX>
    A symmetric directed acyclic graph checker.
    Author:
    AO Industries, Inc.
    • Constructor Detail

      • SymmetricAcyclicGraphChecker

        public SymmetricAcyclicGraphChecker​(SymmetricMultiGraph<V,​?,​? extends EX> graph,
                                            boolean isForward)
    • Method Detail

      • checkGraph

        public void checkGraph()
                        throws AsymmetricException,
                               CycleException,
                               EX extends Exception
        Test the graph for cycles and makes sure that all connections are consistent with back connections. Cycle algorithm adapted from: http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/depthSearch.htm http://www.eecs.berkeley.edu/~kamil/teaching/sp03/041403.pdf In the case of a multigraph, any number of edges one direction is considered a match to any number of edges back. The number does not need to be equal.
        Specified by:
        checkGraph in interface GraphChecker<V>
        Throws:
        AsymmetricException - where the edges are not symmetric
        CycleException - if there is a cycle in the graph
        EX extends Exception