Package edu.cmu.tetrad.search.utils
Class Bes.Arrow
java.lang.Object
edu.cmu.tetrad.search.utils.Bes.Arrow
- All Implemented Interfaces:
Comparable<Bes.Arrow>
- Enclosing class:
- Bes
An arrow in the search.
-
Method Summary
Modifier and TypeMethodDescriptionint
Sorting by bump, high to low.getA()
Returns the first node.getB()
Returns the second node.double
getBump()
Returns the bump.int
getIndex()
Returns the index of the arrow.Returns the set of nodes that are in TNeighbors.Returns the set of nodes that are in TNeighbors.void
setTNeighbors
(Set<Node> TNeighbors) Sets the set of nodes that are in TNeighbors.toString()
Returns the index of the arrow.
-
Method Details
-
getBump
public double getBump()Returns the bump.- Returns:
- The bump.
-
getA
Returns the first node.- Returns:
- The first node.
-
getB
Returns the second node.- Returns:
- The second node.
-
compareTo
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 interfaceComparable<Bes.Arrow>
-
toString
Returns the index of the arrow. -
getIndex
public int getIndex()Returns the index of the arrow.- Returns:
- The index of the arrow.
-
getTNeighbors
Returns the set of nodes that are in TNeighbors.- Returns:
- The set of nodes that are in TNeighbors.
-
setTNeighbors
Sets the set of nodes that are in TNeighbors.- Parameters:
TNeighbors
- The set of nodes that are in TNeighbors.
-
getParents
Returns the set of nodes that are in TNeighbors.- Returns:
- The set of nodes that are in TNeighbors.
-