Class CausalKnowledgeBase
java.lang.Object
org.tweetyproject.commons.BeliefSet<PlFormula, PlSignature>
org.tweetyproject.logics.pl.syntax.PlBeliefSet
org.tweetyproject.causal.syntax.CausalKnowledgeBase
- All Implemented Interfaces:
Iterable<PlFormula>,Collection<PlFormula>,BeliefBase
This class describes a causal knowledge base which consists of a
StructuralCausalModel and a set of background assumptions.- Author:
- Julian Sander, Lars Bengel
- See Also:
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE -
Constructor Summary
ConstructorsConstructorDescriptionInitializes an empty causal knowledge baseInitializes a causal knowledge from the given causal model without assumptionsCausalKnowledgeBase(StructuralCausalModel model, Collection<PlFormula> assumptions) Initialize a new causal knowledge base -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAssumption(PlFormula assumption) Adds an assumption to this knowledge base.clone()Returns all propositional formulas of this knowledge base, i.e., the structural equations of the corresponding causal modelReturns a copy of the underlying structural causal model.Returns the twin version of this causal knowledge base.booleanremoveAssumption(PlFormula assumption) Removes an assumption from this knowledge base.toString()Methods inherited from class org.tweetyproject.logics.pl.syntax.PlBeliefSet
getCanonicalOrdering, getMinimalSignature, getSyntaxComponents, toCnfMethods inherited from class org.tweetyproject.commons.BeliefSet
add, add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toStringMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
CausalKnowledgeBase
Initializes a causal knowledge from the given causal model without assumptions- Parameters:
model- some causal model
-
CausalKnowledgeBase
Initialize a new causal knowledge base- Parameters:
model- some causal modelassumptions- Set of assumptions about the background atoms of the causal model.
-
CausalKnowledgeBase
public CausalKnowledgeBase()Initializes an empty causal knowledge base
-
-
Method Details
-
addAssumption
Adds an assumption to this knowledge base.- Parameters:
assumption- The PlFormula representing the assumption to be added- Returns:
- "True" iff the assumption was successfully added
-
removeAssumption
Removes an assumption from this knowledge base.- Parameters:
assumption- The assumption to be removed.- Returns:
- true if the assumption was successfully removed, false otherwise.
-
getAssumptions
- Returns:
- Set of
PlFormula, which are the assumptions of this instance.
-
getCausalModel
Returns a copy of the underlying structural causal model.- Returns:
- the causal model
-
getTwinVersion
Returns the twin version of this causal knowledge base.- Returns:
- the twin causal knowledge base
-
getBeliefs
Returns all propositional formulas of this knowledge base, i.e., the structural equations of the corresponding causal model- Returns:
- the set of structural equations
-
toString
- Specified by:
toStringin interfaceBeliefBase- Overrides:
toStringin classBeliefSet<PlFormula, PlSignature>
-
clone
-