Class RecursiveBlockingChokePointA

java.lang.Object
edu.cmu.tetrad.search.RecursiveBlockingChokePointA

public final class RecursiveBlockingChokePointA extends Object
This class provides methods for identifying a minimal set of blocking nodes (a "choke point") that prevent all paths between two specified nodes in a graph using recursive and iterative mechanisms. The process allows for certain nodes and edges to be ignored during the computation, and uses depth-first search and path intersection logic to determine the blocking set. This class is designed to be utility-based and is not meant to be instantiated.
  • Method Details

    • blockPathsRecursively

      public static Set<Node> blockPathsRecursively(Graph G, Node x, Node y, Set<Node> forbidden, int maxPathLength) throws InterruptedException
      Identifies and blocks paths between two nodes in a graph recursively, ensuring that all possible open paths between the nodes are restricted by adding blocking nodes to a set. The method is designed to explore paths in a graph iteratively, checking for intersections, non-colliders, and other criteria to determine the appropriate blocking nodes. If all paths are successfully blocked, a set containing the blocking nodes is returned. If blocking is not feasible, the method returns null.
      Parameters:
      G - the graph in which paths are analyzed and blocked
      x - the source node from which the path originates
      y - the destination node to which the path leads
      forbidden - a set of nodes that cannot be part of the paths or blocking set
      maxPathLength - the maximum length of allowable paths to be considered
      Returns:
      a set of nodes that block all paths between x and y, or null if blocking all paths is not feasible
      Throws:
      InterruptedException - if the process is interrupted