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:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSemProposition
(SemIm semIm) Creates a new Proposition which allows all values.SemProposition
(SemProposition proposition) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
getSemIm()
double
getValue
(int i) double
int
hashCode()
static SemProposition
Generates a simple exemplar of this class to test serialization.void
setValue
(int i, double value) void
static SemProposition
toString()
-
Constructor Details
-
SemProposition
Creates a new Proposition which allows all values. -
SemProposition
-
-
Method Details
-
tautology
-
serializableInstance
Generates a simple exemplar of this class to test serialization. -
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
-
hashCode
public int hashCode() -
toString
-
getValue
public double getValue(int i) -
setValue
public void setValue(int i, double value) -
getValue
-
setValue
-