Class Bes.Arrow

java.lang.Object
edu.cmu.tetrad.search.utils.Bes.Arrow
All Implemented Interfaces:
Comparable<Bes.Arrow>
Enclosing class:
Bes

public static class Bes.Arrow extends Object implements Comparable<Bes.Arrow>
An arrow in the search.
  • Method Details

    • getBump

      public double getBump()
      Returns the bump.
      Returns:
      The bump.
    • getA

      public Node getA()
      Returns the first node.
      Returns:
      The first node.
    • getB

      public Node getB()
      Returns the second node.
      Returns:
      The second node.
    • compareTo

      public int compareTo(@NotNull @NotNull Bes.Arrow arrow)
      Sorting by bump, high to low. The problem is the SortedSet contains won't add a new element if it compares to zero with an existing element, so for the cases where the comparison is to zero (i.e. have the same bump), we need to determine as quickly as possible a determinate ordering (fixed) ordering for two variables. The fastest way to do this is using a hash code, though it's still possible for two Arrows to have the same hash code but not be equal. If we're paranoid, in this case we calculate a determinate comparison not equal to zero by keeping a list. This last part is commened out by default.
      Specified by:
      compareTo in interface Comparable<Bes.Arrow>
    • toString

      public String toString()
      Returns the index of the arrow.
      Overrides:
      toString in class Object
      Returns:
      The index of the arrow.
    • getIndex

      public int getIndex()
      Returns the index of the arrow.
      Returns:
      The index of the arrow.
    • getTNeighbors

      public Set<Node> getTNeighbors()
      Returns the set of nodes that are in TNeighbors.
      Returns:
      The set of nodes that are in TNeighbors.
    • setTNeighbors

      public void setTNeighbors(Set<Node> TNeighbors)
      Sets the set of nodes that are in TNeighbors.
      Parameters:
      TNeighbors - The set of nodes that are in TNeighbors.
    • getParents

      public Set<Node> getParents()
      Returns the set of nodes that are in TNeighbors.
      Returns:
      The set of nodes that are in TNeighbors.