## Class ProbabilisticConditional

• All Implemented Interfaces:
`Formula`, `Rule<PlFormula,​PlFormula>`, `ProbabilityAware`, `SimpleLogicalFormula`

```public class ProbabilisticConditional
extends Conditional
implements ProbabilityAware```
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

Constructors
Constructor Description
```ProbabilisticConditional​(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

Modifier and Type Method Description
`ProbabilisticConditional` `complement()`
`boolean` `equals​(java.lang.Object obj)`
`Probability` `getProbability()`
Returns the probability of this conditional.
`Probability` `getUniformProbability()`
`int` `hashCode()`
`boolean` `qualitativeEquals​(ProbabilisticConditional other)`
Checks whether this and the given probabilistic conditional are qualitatively equivalent, i.e.
`java.lang.String` `toString()`
• ### Methods inherited from class net.sf.tweety.logics.cl.syntax.Conditional

`addPremise, addPremises, clone, combineWithAnd, combineWithOr, getAtoms, getConclusion, getPredicateCls, getPredicates, getPremise, getSignature, isConstraint, isFact, isLiteral, setConclusion`
• ### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`
• ### Constructor Detail

• #### ProbabilisticConditional

```public ProbabilisticConditional​(PlFormula conclusion,
Probability probability)```
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

```public ProbabilisticConditional​(PlFormula premise,
PlFormula conclusion,
Probability probability)```
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

```public ProbabilisticConditional​(Conditional conditional,
Probability probability)```
Creates a new probabilistic conditional using the given conditional and probability.
Parameters:
`conditional` - a conditional.
`probability` - a probability.
• ### Method Detail

• #### qualitativeEquals

`public boolean qualitativeEquals​(ProbabilisticConditional other)`
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

`public Probability getProbability()`
Returns the probability of this conditional.
Returns:
the probability of this conditional.
• #### toString

`public java.lang.String toString()`
Overrides:
`toString` in class `Conditional`
• #### complement

`public ProbabilisticConditional complement()`
Overrides:
`complement` in class `Conditional`
• #### hashCode

`public int hashCode()`
Specified by:
`hashCode` in interface `SimpleLogicalFormula`
Overrides:
`hashCode` in class `Conditional`
• #### equals

`public boolean equals​(java.lang.Object obj)`
Specified by:
`equals` in interface `SimpleLogicalFormula`
Overrides:
`equals` in class `Conditional`
• #### getUniformProbability

`public Probability getUniformProbability()`
Specified by:
`getUniformProbability` in interface `ProbabilityAware`
Returns:
this formula's probability in the uniform distribution.