Package edu.cmu.tetrad.bayes
Class Evidence
java.lang.Object
edu.cmu.tetrad.bayes.Evidence
- All Implemented Interfaces:
- TetradSerializable,- Serializable
Stores information for a variable source about evidence we have for each variable as
 well as whether each variable has been manipulated.
- Author:
- Joseph Ramsey
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionCopy constructor.Evidence(Evidence evidence, VariableSource variableSource) Evidence(Proposition proposition) Wraps the proposition.
- 
Method SummaryModifier and TypeMethodDescriptionbooleangetCategory(Node node, int j) intgetCategoryIndex(String nodeName, String category) getNode(int nodeIndex) intgetNodeIndex(String nodeName) intgetNumCategories(int variable) intgetVariable(String nodeName) inthashCode()booleanhasNoEvidence(int variable) booleanisIncompatibleWith(VariableSource variableSource) Returna true just in case this evidence has a list of variables equal to those of the given variable source.booleanisManipulated(int nodeIndex) static EvidenceGenerates a simple exemplar of this class to test serialization.voidsetManipulated(int nodeIndex, boolean manipulated) static Evidencetautology(VariableSource variableSource) toString()
- 
Constructor Details- 
EvidenceCopy constructor.
- 
EvidenceWraps the proposition. The Bayes IM and manipulation will be null.
- 
Evidence
 
- 
- 
Method Details- 
tautology
- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getVariableSource- Returns:
- the Bayes IM that this is evidence for.
 
- 
getNodeIndex
- 
getCategoryIndex
- 
getNumNodespublic int getNumNodes()
- 
getNode
- 
getVariable
- 
getNumCategoriespublic int getNumCategories(int variable) 
- 
getProposition
- 
isManipulatedpublic boolean isManipulated(int nodeIndex) 
- 
setManipulatedpublic void setManipulated(int nodeIndex, boolean manipulated) 
- 
toString
- 
hasNoEvidencepublic boolean hasNoEvidence(int variable) 
- 
getVariablesInEvidence- Returns:
- the variable for which there is evidence.
 
- 
getCategory
- 
isIncompatibleWithReturna true just in case this evidence has a list of variables equal to those of the given variable source.
- 
equals
- 
hashCodepublic int hashCode()
 
-