Class Triple

java.lang.Object
edu.cmu.tetrad.graph.Triple
All Implemented Interfaces:
TetradSerializable, Serializable

public final class Triple extends Object implements 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, after Frank Wimberly.
See Also:
  • Constructor Details

    • Triple

      public Triple(Node x, Node y, Node z)
      Constructs a triple of nodes.
      Parameters:
      x - a Node object
      y - a Node object
      z - a Node object
  • Method Details

    • serializableInstance

      public static Triple serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      a Triple object
    • pathString

      public static String pathString(Graph graph, Node x, Node y, Node z)

      pathString.

      Parameters:
      graph - a Graph object
      x - a Node object
      y - a Node object
      z - a Node object
      Returns:
      a String object
    • getX

      public Node getX()

      Getter for the field x.

      Returns:
      a Node object
    • getY

      public Node getY()

      Getter for the field y.

      Returns:
      a Node object
    • getZ

      public Node getZ()

      Getter for the field z.

      Returns:
      a Node object
    • hashCode

      public int hashCode()

      hashCode.

      Overrides:
      hashCode in class Object
      Returns:
      a int
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()

      toString.

      Overrides:
      toString in class Object
      Returns:
      a String object
    • alongPathIn

      public boolean alongPathIn(Graph graph)

      alongPathIn.

      Parameters:
      graph - a Graph object
      Returns:
      a boolean