Package edu.cmu.tetrad.data
Class KnowledgeGroup
java.lang.Object
edu.cmu.tetrad.data.KnowledgeGroup
- All Implemented Interfaces:
- TetradSerializable,- Serializable
Represents a "Other Group" in Knowledge, which can be understood as: Group1 -> Group2 where there are
 edges between all members of Group1 to Group2.
 
Immutable.
- Author:
- Tyler Gibson
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionKnowledgeGroup(int type) Constructs an empty instance of a knowledge group.KnowledgeGroup(int type, Set<String> from, Set<String> to) Constructs a group given the type.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontainsEdge(KnowledgeEdge edge) booleanEquals when they are the same type and have the same edges.getEdges()intgetType()inthashCode()Computes a hashcode.booleanisEmpty()States whether this group is empty, that is there is no edges in it (Note there may be some partial information though).static KnowledgeGroupGenerates a simple exemplar of this class to test serialization.
- 
Field Details- 
REQUIREDpublic static final int REQUIREDThe types of groups (Can an enum be used instead?)- See Also:
 
- 
FORBIDDENpublic static final int FORBIDDEN- See Also:
 
 
- 
- 
Constructor Details- 
KnowledgeGroupConstructs a group given the type.- Parameters:
- type- - the type
 
- 
KnowledgeGrouppublic KnowledgeGroup(int type) Constructs an empty instance of a knowledge group.
 
- 
- 
Method Details- 
serializableInstanceGenerates a simple exemplar of this class to test serialization.
- 
getTypepublic int getType()
- 
isEmptypublic boolean isEmpty()States whether this group is empty, that is there is no edges in it (Note there may be some partial information though).
- 
getFromVariables
- 
getToVariables
- 
getEdges- Returns:
- - edges.
 
- 
containsEdge
- 
hashCodepublic int hashCode()Computes a hashcode.
- 
equalsEquals when they are the same type and have the same edges.
 
-