Class GraphChange
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.GraphChange
Provides s a data structure created mainly for use in the ION search algorithm. However, it models a general concept: storage for a variety of seperate changes one could possibly apply to a PAG.
By convention, the NodePairs in the orients ArrayList are ordered such that Node1 is the "from" node and Node2 is the "to" node (ie 1 o-> 2).
- Version:
- $Id: $Id
- Author:
- Trevor Burns
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor, holds no changes.GraphChange(GraphChange source) Copy constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCollider(Triple colliderTrip) Add another collider operation to the GraphChange.voidaddNonCollider(Triple nonColliderTrip) Add another non-collider operation to the GraphChange.voidAdd another orient operation to the GraphChange.voidAdd another remove operation to the GraphChange.Outputs a new PAG, a copy of the input excepting the applied changes of this object.booleancontains(GraphChange gc) Contains is defined such that if the internal strucs of this GraphChange all individually contain the elements in the corresponding strucs of GraphChange gc, then this "contains" gc.booleanReturn collidersReturn noncollidersReturn orientsReturn removesinthashCode()hashCode.booleanisConsistent(GraphChange other) Consistency check, nonexhaustive, but catches the most blatant inconsistencies.toString()Anly outputs ops which have elements, not empty structures.voidunion(GraphChange other) Absorbs all changes from the GraphChange other into the calling GraphChange.
- 
Constructor Details- 
GraphChangepublic GraphChange()Default constructor, holds no changes.
- 
GraphChangeCopy constructor.- Parameters:
- source- a- GraphChangeobject
 
 
- 
- 
Method Details- 
unionAbsorbs all changes from the GraphChange other into the calling GraphChange.- Parameters:
- other- a- GraphChangeobject
 
- 
isConsistentConsistency check, nonexhaustive, but catches the most blatant inconsistencies.- Parameters:
- other- a- GraphChangeobject
- Returns:
- a boolean
 
- 
applyToOutputs a new PAG, a copy of the input excepting the applied changes of this object. Will return null if some change fails (ie an obscure inconsistensy).
- 
addRemoveAdd another remove operation to the GraphChange.- Parameters:
- removalEdge- a- Edgeobject
 
- 
addColliderAdd another collider operation to the GraphChange.- Parameters:
- colliderTrip- a- Tripleobject
 
- 
addNonColliderAdd another non-collider operation to the GraphChange.- Parameters:
- nonColliderTrip- a- Tripleobject
 
- 
addOrientAdd another orient operation to the GraphChange.
- 
containsContains is defined such that if the internal strucs of this GraphChange all individually contain the elements in the corresponding strucs of GraphChange gc, then this "contains" gc.- Parameters:
- gc- a- GraphChangeobject
- Returns:
- a boolean
 
- 
toStringAnly outputs ops which have elements, not empty structures.
- 
getCollidersReturn colliders- Returns:
- a Listobject
 
- 
getNoncollidersReturn noncolliders- Returns:
- a Listobject
 
- 
getRemovesReturn removes- Returns:
- a Listobject
 
- 
getOrientsReturn orients- Returns:
- a Listobject
 
- 
equalsEquals is defined such that if the internal strucs of this GraphChange all individually equal the corresponding strucs of GraphChange gc, then this "equals" gc 
- 
hashCodepublic int hashCode()hashCode. 
 
-