Class Dag


  • public final class Dag
    extends Object
    Includes methods for testing whether a network is a Directed Acyclic Graph (DAG).
    See Also:
    Network.isDag()
    • Method Detail

      • isDag

        public static boolean isDag​(Network network)
        Determines if a network is a Directed Acyclic Graph (DAG).
        Parameters:
        network - The network to test.
        Returns:
        true if a dag, false otherwise.
        See Also:
        Network.isDag()
      • isDag

        public static boolean isDag​(Network network,
                                    Iterable<Link> ignore,
                                    Iterable<Link> extra)
        Determines if a network is a DAG (Directed Acyclic Graph). The test allows the exclusion of certain links, and the inclusion of extra links that have not yet been added to the network.
        Parameters:
        network - The network to test.
        ignore - Optional links to ignore. Can be null.
        extra - Optional extra links to include. Can be null.
        Returns:
        true if a dag, false otherwise.
        See Also:
        Network.isDag()