Class ProbabilisticConditional
java.lang.Object
org.tweetyproject.logics.cl.syntax.Conditional
org.tweetyproject.logics.pcl.syntax.ProbabilisticConditional
- All Implemented Interfaces:
Formula
,Rule<PlFormula,
,PlFormula> ProbabilityAware
,SimpleLogicalFormula
This class represents a probabilistic conditional of the form (B|A)[p]
with formulas A,B and a probability p.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionProbabilisticConditional
(Conditional conditional, Probability probability) Creates a new probabilistic conditional using the given conditional and probability.ProbabilisticConditional
(PlFormula premise, PlFormula conclusion, Probability probability) Creates a new probabilistic conditional with the given premise, conclusion, and probability.ProbabilisticConditional
(PlFormula conclusion, Probability probability) Creates a new probabilistic conditional with a tautological premise and given conclusion and probability. -
Method Summary
Methods inherited from class org.tweetyproject.logics.cl.syntax.Conditional
addPremise, addPremises, clone, combineWithAnd, combineWithOr, getAtoms, getConclusion, getPredicateCls, getPredicates, getPremise, getSignature, isConstraint, isFact, isLiteral, setConclusion
-
Constructor Details
-
ProbabilisticConditional
Creates a new probabilistic conditional with a tautological premise and given conclusion and probability.- Parameters:
conclusion
- the conclusion (a formula) of this conditional.probability
- a probability.
-
ProbabilisticConditional
Creates a new probabilistic conditional with the given premise, conclusion, and probability.- Parameters:
premise
- the premise (a formula) of this conditional.conclusion
- the conclusion (a formula) of this conditional.probability
- a probability.
-
ProbabilisticConditional
Creates a new probabilistic conditional using the given conditional and probability.- Parameters:
conditional
- a conditional.probability
- a probability.
-
-
Method Details
-
qualitativeEquals
Checks whether this and the given probabilistic conditional are qualitatively equivalent, i.e. whether they are equivalent when neglecting the probability.- Parameters:
other
- some probabilistic conditional.- Returns:
- "true" iff the two conditionals are qualitatively equivalent.
-
getProbability
Returns the probability of this conditional.- Returns:
- the probability of this conditional.
-
toString
- Overrides:
toString
in classConditional
-
complement
Description copied from class:Conditional
Returns the complement of this conditional.The complement is a new conditional with the same premise but with the complement of the conclusion.
- Overrides:
complement
in classConditional
- Returns:
- a new conditional that represents the complement of this conditional.
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classConditional
-
equals
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classConditional
-
getUniformProbability
- Specified by:
getUniformProbability
in interfaceProbabilityAware
- Returns:
- this formula's probability in the uniform distribution.
-