Class SemManipulation

java.lang.Object
edu.cmu.tetrad.sem.SemManipulation
All Implemented Interfaces:
TetradSerializable, Serializable

public final class SemManipulation extends Object implements TetradSerializable
Stores information for a BayesIm about evidence we have for each variable as well as whether each variable has been manipulated.
Version:
$Id: $Id
Author:
josephramsey
See Also:
  • Constructor Details

    • SemManipulation

      public SemManipulation(SemIm semIm)
      Constructs a container for evidence for the given Bayes IM.
      Parameters:
      semIm - a SemIm object
    • SemManipulation

      public SemManipulation(SemManipulation manipulation)

      Constructor for SemManipulation.

      Parameters:
      manipulation - a SemManipulation object
  • Method Details

    • serializableInstance

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

      public int getNodeIndex(String nodeName)

      getNodeIndex.

      Parameters:
      nodeName - a String object
      Returns:
      a int
    • getNode

      public Node getNode(int nodeIndex)

      getNode.

      Parameters:
      nodeIndex - a int
      Returns:
      a Node object
    • isManipulated

      public boolean isManipulated(int nodeIndex)

      isManipulated.

      Parameters:
      nodeIndex - a int
      Returns:
      a boolean
    • setManipulated

      public void setManipulated(int nodeIndex, boolean manipulated)

      Setter for the field manipulated.

      Parameters:
      nodeIndex - a int
      manipulated - a boolean
    • toString

      public String toString()

      toString.

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

      public boolean equals(Object o)
      Compares the current instance with the specified object for equality.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to be compared with the current instance
      Returns:
      true if the specified object is equal to the current instance, false otherwise.
      Throws:
      IllegalArgumentException - if the specified object is not an instance of SemManipulation.
    • hashCode

      public int hashCode()

      hashCode.

      Overrides:
      hashCode in class Object
      Returns:
      a int