Class SemProposition

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

public final class SemProposition extends Object implements TetradSerializable
Represents propositions over the variables of a particular BayesIm describing and event of a fairly general sort--namely, conjunctions of propositions that particular variables take on values from a particular disjunctive list of categories. For example, X1 = 1 or 2 and X2 = 3 and X3 = 1 or 3 and X4 = 2 or 3 or 5. The proposition is created by allowing or disallowing particular categories. Notice that "knowing nothing" about a variable is the same as saying that all categories for that variable are allowed, so the proposition by default allows all categories for all variables--i.e. it is a tautology.
Author:
josephramsey
See Also:
  • Constructor Details

    • SemProposition

      public SemProposition(SemIm semIm)
      Creates a new Proposition which allows all values.
    • SemProposition

      public SemProposition(SemProposition proposition)
  • Method Details

    • tautology

      public static SemProposition tautology(SemIm semIm)
    • serializableInstance

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

      public SemIm getSemIm()
      Returns:
      the Bayes IM that this is a proposition for.
    • getNumVariables

      public int getNumVariables()
      Returns:
      the number of variables for the proposition.
    • getNodeIndex

      public int getNodeIndex()
      Returns:
      the index of the variable with the given name, or -1 if such a variable does not exist.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public double getValue(int i)
    • setValue

      public void setValue(int i, double value)
    • getValue

      public double getValue(Node node)
    • setValue

      public void setValue(Node node, double value)