Package edu.cmu.tetrad.graph
Class IndependenceFact
java.lang.Object
edu.cmu.tetrad.graph.IndependenceFact
- All Implemented Interfaces:
TetradSerializable,Serializable,Comparable<IndependenceFact>
public final class IndependenceFact
extends Object
implements Comparable<IndependenceFact>, TetradSerializable
Stores a triple (x, y, z) of nodes. Note that (x, y, z) = (z, y, x). Useful for marking graphs.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIndependenceFact(Node x, Node y, Node... z) Constructor for IndependenceFact.IndependenceFact(Node x, Node y, Set<Node> z) Constructor for IndependenceFact. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IndependenceFact fact) Note that this compareTo method gives a lexical ordering for independence facts and doesn't reflect independence fact equality.booleangetX()Getter for the fieldx.getY()Getter for the fieldy.getZ()getZ.inthashCode()hashCode.static IndependenceFactGenerates a simple exemplar of this class to test serialization.toString()toString.
-
Constructor Details
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
IndependenceFactobject
-
getX
Getter for the field
x.- Returns:
- a
Nodeobject
-
getY
Getter for the field
y.- Returns:
- a
Nodeobject
-
getZ
getZ.
- Returns:
- a
Setobject
-
hashCode
public int hashCode()hashCode.
-
equals
-
toString
toString.
-
compareTo
Note that this compareTo method gives a lexical ordering for independence facts and doesn't reflect independence fact equality. So sorted sets should not be used to check for independence fact existence, for instance. -jdramsey.- Specified by:
compareToin interfaceComparable<IndependenceFact>- Parameters:
fact- aIndependenceFactobject- Returns:
- a int
-