Package edu.cmu.tetrad.sem
Class SemProposition
java.lang.Object
edu.cmu.tetrad.sem.SemProposition
- All Implemented Interfaces:
- TetradSerializable,- Serializable
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:
- Joseph Ramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionSemProposition(SemIm semIm) Creates a new Proposition which allows all values.SemProposition(SemProposition proposition) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanintintgetSemIm()doublegetValue(int i) doubleinthashCode()static SemPropositionGenerates a simple exemplar of this class to test serialization.voidsetValue(int i, double value) voidstatic SemPropositiontoString()
- 
Constructor Details- 
SemPropositionCreates a new Proposition which allows all values.
- 
SemProposition
 
- 
- 
Method Details- 
tautology
- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getSemIm- Returns:
- the Bayes IM that this is a proposition for.
 
- 
getNumVariablespublic int getNumVariables()- Returns:
- the number of variables for the proposition.
 
- 
getNodeIndexpublic int getNodeIndex()- Returns:
- the index of the variable with the given name, or -1 if such a variable does not exist.
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
- 
getValuepublic double getValue(int i) 
- 
setValuepublic void setValue(int i, double value) 
- 
getValue
- 
setValue
 
-