Class TopologicalSort


  • public final class TopologicalSort
    extends Object
    Contains methods to sort nodes in a Bayesian network in topological order.
    • Method Detail

      • sort

        public static Node[] sort​(Network network)
        Returns the nodes in a Bayesian network sorted in topological order.
        Parameters:
        network - The Bayesian network.
        Returns:
        The nodes sorted in topological order.
      • sortWithDepth

        public static TopologicalSortNodeInfo[] sortWithDepth​(Network network)
        Returns the nodes in a Bayesian network sorted and grouped in topological order.
        Parameters:
        network - The Bayesian network.
        Returns:
        The nodes sorted and grouped in topological order.