Package edu.cmu.tetrad.data
Class IndependenceFacts
java.lang.Object
edu.cmu.tetrad.data.IndependenceFacts
- All Implemented Interfaces:
DataModel
,KnowledgeTransferable
,VariableSource
,TetradSerializable
,Serializable
Stores a list of independence facts.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for IndependenceFacts.Constructor for IndependenceFacts.IndependenceFacts
(Graph graph) Constructor for IndependenceFacts. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(IndependenceFact fact) add.copy()
copy.getFacts()
getFacts.Getter for the fieldknowledge
.getName()
Getter for the fieldname
.getVariable
(String name) getVariable.getVariableNames.getVariables.boolean
isContinuous.boolean
isDiscrete.boolean
isIndependent
(Node x, Node y, Node... z) isIndependent.boolean
isIndependent
(Node x, Node y, Set<Node> z) isIndependent.boolean
isMixed()
isMixed.void
remove
(IndependenceFact fact) remove.static IndependenceFacts
Generates a simple exemplar of this class to test serialization.void
setKnowledge
(Knowledge knowledge) Sets knowledge to a copy of the given object.void
Sets the name of the data model (may be null).void
Setter for the fieldnodes
.int
size()
size.toString()
toString.
-
Constructor Details
-
IndependenceFacts
public IndependenceFacts()Constructor for IndependenceFacts.
-
IndependenceFacts
-
IndependenceFacts
Constructor for IndependenceFacts.
- Parameters:
facts
- aIndependenceFacts
object
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
IndependenceFacts
object
-
add
-
toString
-
isContinuous
public boolean isContinuous()isContinuous.
- Specified by:
isContinuous
in interfaceDataModel
- Returns:
- true if the data model is continuous, false otherwise.
-
isDiscrete
public boolean isDiscrete()isDiscrete.
- Specified by:
isDiscrete
in interfaceDataModel
- Returns:
- true if the data model is discrete, false otherwise.
-
isMixed
-
getVariable
getVariable.
- Specified by:
getVariable
in interfaceDataModel
- Parameters:
name
- aString
object- Returns:
- the variable with the given name, or null if no such variable exists.
-
copy
-
remove
-
getName
-
setName
-
isIndependent
-
isIndependent
-
getKnowledge
Getter for the field
knowledge
.- Specified by:
getKnowledge
in interfaceKnowledgeTransferable
- Returns:
- a
Knowledge
object
-
setKnowledge
Sets knowledge to a copy of the given object.- Specified by:
setKnowledge
in interfaceKnowledgeTransferable
- Parameters:
knowledge
- the knowledge to set
-
getVariables
getVariables.
- Specified by:
getVariables
in interfaceVariableSource
- Returns:
- a
List
object
-
getVariableNames
getVariableNames.
- Specified by:
getVariableNames
in interfaceVariableSource
- Returns:
- a
List
object
-
setNodes
-
size
public int size()size.
- Returns:
- a int
-
getFacts
-