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 Summary
ConstructorsConstructorDescriptionDefault constructor, holds no changes.GraphChange
(GraphChange source) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollider
(Triple colliderTrip) Add another collider operation to the GraphChange.void
addNonCollider
(Triple nonColliderTrip) Add another non-collider operation to the GraphChange.void
Add another orient operation to the GraphChange.void
Add another remove operation to the GraphChange.Outputs a new PAG, a copy of the input excepting the applied changes of this object.boolean
contains
(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.boolean
Return collidersReturn noncollidersReturn orientsReturn removesint
hashCode()
hashCode.boolean
isConsistent
(GraphChange other) Consistency check, nonexhaustive, but catches the most blatant inconsistencies.toString()
Anly outputs ops which have elements, not empty structures.void
union
(GraphChange other) Absorbs all changes from the GraphChange other into the calling GraphChange.
-
Constructor Details
-
GraphChange
public GraphChange()Default constructor, holds no changes. -
GraphChange
-
-
Method Details
-
union
Absorbs all changes from the GraphChange other into the calling GraphChange.- Parameters:
other
- aGraphChange
object
-
isConsistent
Consistency check, nonexhaustive, but catches the most blatant inconsistencies.- Parameters:
other
- aGraphChange
object- Returns:
- a boolean
-
applyTo
-
addRemove
-
addCollider
-
addNonCollider
-
addOrient
-
contains
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.- Parameters:
gc
- aGraphChange
object- Returns:
- a boolean
-
toString
-
getColliders
-
getNoncolliders
-
getRemoves
-
getOrients
-
equals
-
hashCode
-