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 TypeMethodDescriptionvoidadd(IndependenceFact fact) add.copy()copy.getFacts()getFacts.Getter for the fieldknowledge.getName()Getter for the fieldname.getVariable(String name) getVariable.getVariableNames.getVariables.booleanisContinuous.booleanisDiscrete.booleanisIndependent(Node x, Node y, Node... z) isIndependent.booleanisIndependent(Node x, Node y, Set<Node> z) isIndependent.booleanisMixed()isMixed.voidremove(IndependenceFact fact) remove.static IndependenceFactsGenerates a simple exemplar of this class to test serialization.voidsetKnowledge(Knowledge knowledge) Sets knowledge to a copy of the given object.voidSets the name of the data model (may be null).voidSetter for the fieldnodes.intsize()size.toString()toString.
-
Constructor Details
-
IndependenceFacts
public IndependenceFacts()Constructor for IndependenceFacts.
-
IndependenceFacts
Constructor for IndependenceFacts.
- Parameters:
graph- aGraphobject
-
IndependenceFacts
Constructor for IndependenceFacts.
- Parameters:
facts- aIndependenceFactsobject
-
-
Method Details
-
serializableInstance
Generates a simple exemplar of this class to test serialization.- Returns:
- a
IndependenceFactsobject
-
add
add.
- Parameters:
fact- aIndependenceFactobject
-
toString
toString.
-
isContinuous
public boolean isContinuous()isContinuous.
- Specified by:
isContinuousin interfaceDataModel- Returns:
- true if the data model is continuous, false otherwise.
-
isDiscrete
public boolean isDiscrete()isDiscrete.
- Specified by:
isDiscretein interfaceDataModel- Returns:
- true if the data model is discrete, false otherwise.
-
isMixed
public boolean isMixed()isMixed.
-
getVariable
getVariable.
- Specified by:
getVariablein interfaceDataModel- Parameters:
name- aStringobject- Returns:
- the variable with the given name, or null if no such variable exists.
-
copy
copy.
-
remove
remove.
- Parameters:
fact- aIndependenceFactobject
-
getName
Getter for the field
name. -
setName
Sets the name of the data model (may be null). -
isIndependent
isIndependent.
-
isIndependent
isIndependent.
-
getKnowledge
Getter for the field
knowledge.- Specified by:
getKnowledgein interfaceKnowledgeTransferable- Returns:
- a
Knowledgeobject
-
setKnowledge
Sets knowledge to a copy of the given object.- Specified by:
setKnowledgein interfaceKnowledgeTransferable- Parameters:
knowledge- the knowledge to set
-
getVariables
getVariables.
- Specified by:
getVariablesin interfaceVariableSource- Returns:
- a
Listobject
-
getVariableNames
getVariableNames.
- Specified by:
getVariableNamesin interfaceVariableSource- Returns:
- a
Listobject
-
setNodes
Setter for the field
nodes.- Parameters:
nodes- aListobject
-
size
public int size()size.
- Returns:
- a int
-
getFacts
getFacts.
- Returns:
- a
Listobject
-