Class SepsetMapDci

java.lang.Object
edu.cmu.tetrad.search.work_in_progress.SepsetMapDci

public final class SepsetMapDci extends Object
This is the same as the usual SepsetMap described below, but also keeps up with the individual sets of conditioning nodes for d-separation relations for use with the Distributed Causal Inference (DCI) algorithm.

Stores a map from pairs of nodes to separating sets--that is, for each unordered pair of nodes {node1, node2} in a graph, stores a set of nodes conditional on which node1 and node2 are independent (where the nodes are considered as variables) or stores null if the pair was not judged to be independent. (Note that if a sepset is non-null and empty, that should means that the compared nodes were found to be independent conditional on the empty set, whereas if a sepset is null, that should mean that no set was found yet conditional on which the compared nodes are independent. So at the end of the search, a null sepset carries different information from an empty sepset.)> 0

We cast the variable-like objects to Node to allow them either to be variables explicitly or else to be graph nodes that in some model could be considered as variables. This allows us to use d-separation as a graphical indicator of what independendence in models ideally should be.> 0

Version:
$Id: $Id
Author:
Robert Tillman
  • Constructor Details

    • SepsetMapDci

      public SepsetMapDci()

      Constructor for SepsetMapDci.

    • SepsetMapDci

      public SepsetMapDci(SepsetMapDci map)

      Constructor for SepsetMapDci.

      Parameters:
      map - a SepsetMapDci object
  • Method Details

    • serializableInstance

      public static SepsetMap serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      a SepsetMap object
    • set

      public void set(Node x, Node y, Set<Node> z)
      Sets the sepset for {x, y} to be z. Note that {x, y} is unordered.
      Parameters:
      x - a Node object
      y - a Node object
      z - a Set object
    • get

      public Set<Node> get(Node x, Node y)
      Retrieves the sepset previously set for {x, y}, or null if no such set was previously set.
      Parameters:
      x - a Node object
      y - a Node object
      Returns:
      a Set object
    • getSet

      public Set<Set<Node>> getSet(Node x, Node y)
      Retrieves the set of all condioning sets for {x, y} or null if no such set was ever set
      Parameters:
      x - a Node object
      y - a Node object
      Returns:
      a Set object
    • set

      public void set(Node x, LinkedHashSet<Node> z)

      set.

      Parameters:
      x - a Node object
      z - a LinkedHashSet object
    • get

      public LinkedHashSet<Node> get(Node x)

      get.

      Parameters:
      x - a Node object
      Returns:
      a LinkedHashSet object
    • getSeparatedPairs

      public Set<Set<Node>> getSeparatedPairs()

      getSeparatedPairs.

      Returns:
      a Set object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • size

      public int size()

      size.

      Returns:
      a int
    • toString

      public String toString()

      toString.

      Overrides:
      toString in class Object
      Returns:
      a String object