Class KnowledgeEdge

java.lang.Object
edu.cmu.tetrad.data.KnowledgeEdge
All Implemented Interfaces:
TetradSerializable, Serializable

public final class KnowledgeEdge extends Object implements TetradSerializable
Implements a knowledge edge X-->Y as a simple ordered pair of strings.
Author:
josephramsey
See Also:
  • Constructor Details

    • KnowledgeEdge

      public KnowledgeEdge(String from, String to)
      Constructs a knowledge edge for from-->to.
  • Method Details

    • serializableInstance

      public static KnowledgeEdge serializableInstance()
      Generates a simple exemplar of this class to test serialization.
    • getFrom

      public String getFrom()
      Returns:
      the tail node of the edge.
    • getTo

      public String getTo()
      Returns:
      the head node of the edge.
    • equals

      public boolean equals(Object object)
      Reteurns true if (from1, to1) == (from2, to2).
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Returns:
      a good hashcode.
    • toString

      public String toString()
      Overrides:
      toString in class Object