Class RelationalProbabilisticConditional
java.lang.Object
org.tweetyproject.logics.commons.syntax.RelationalFormula
org.tweetyproject.logics.rcl.syntax.RelationalConditional
org.tweetyproject.logics.rpcl.syntax.RelationalProbabilisticConditional
- All Implemented Interfaces:
Formula
,Rule<FolFormula,
,FolFormula> ClassicalFormula
,ComplexLogicalFormula
,Conjunctable
,Disjunctable
,Invertable
,LogicStructure
,ProbabilityAware
,QuantifiedFormula
,SimpleLogicalFormula
This class represents a relational probabilistic conditional, i.e. a structure (B|A)[p]
with first-order formulas A and B and a probability p.
Premise and conclusion of this conditional must confirm to a fol language without quantifiers and without functions (@see org.tweetyproject.logics.firstorderlogic.lang.FolLanguageNoQuantifiersNoFunctions)
Premise and conclusion of this conditional must confirm to a fol language without quantifiers and without functions (@see org.tweetyproject.logics.firstorderlogic.lang.FolLanguageNoQuantifiersNoFunctions)
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionRelationalProbabilisticConditional
(FolFormula premise, FolFormula conclusion, Probability probability) Creates a new conditional with the given premise, conclusion and probability.RelationalProbabilisticConditional
(FolFormula conclusion, Probability probability) Creates a new conditional with the given conclusion and probability and a tautological premise.RelationalProbabilisticConditional
(RelationalConditional conditional, Probability probability) Creates a new relational probabilistic conditional with the given conditional and probability -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the probability of this conditional.int
hashCode()
substitute
(Term<?> v, Term<?> t) Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula.toString()
Methods inherited from class org.tweetyproject.logics.rcl.syntax.RelationalConditional
addPremise, addPremises, clone, combineWithAnd, combineWithOr, containsQuantifier, getAtoms, getConclusion, getFunctors, getPredicates, getPremise, getQuantifierVariables, getSignature, getTerms, getTerms, getUnboundVariables, getUniformProbability, isClosed, isClosed, isConstraint, isFact, isLiteral, isWellBound, isWellBound, setConclusion
Methods inherited from class org.tweetyproject.logics.commons.syntax.RelationalFormula
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substitute
-
Constructor Details
-
RelationalProbabilisticConditional
public RelationalProbabilisticConditional(FolFormula premise, FolFormula conclusion, Probability probability) Creates a new conditional with the given premise, conclusion and probability.- Parameters:
premise
- a fol formula.conclusion
- a fol formula.probability
- a probability.
-
RelationalProbabilisticConditional
Creates a new conditional with the given conclusion and probability and a tautological premise.- Parameters:
conclusion
- a fol formula.probability
- a probability.
-
RelationalProbabilisticConditional
public RelationalProbabilisticConditional(RelationalConditional conditional, Probability probability) Creates a new relational probabilistic conditional with the given conditional and probability- Parameters:
conditional
- a relational conditional.probability
- a probability.
-
-
Method Details
-
getProbability
Returns the probability of this conditional.- Returns:
- the probability of this conditional.
-
substitute
Description copied from class:RelationalFormula
Substitutes all occurrences of term "v" in this formula by term "t" and returns the new formula. NOTE: if "v" is a variable and bound to a quantifier then "v" is not substituted in that quantifiers inner formula.- Specified by:
substitute
in interfaceComplexLogicalFormula
- Overrides:
substitute
in classRelationalConditional
- Parameters:
v
- the term to be substituted.t
- the term to substitute.- Returns:
- a formula where every occurrence of "v" is replaced by "t".
- Throws:
IllegalArgumentException
- if "v" and "t" are of different sorts (NOTE: this exception is only thrown when "v" actually appears in this formula).
-
toString
- Overrides:
toString
in classRelationalConditional
-
complement
- Specified by:
complement
in interfaceInvertable
- Overrides:
complement
in classRelationalConditional
- Returns:
- the complement of this formula.
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceSimpleLogicalFormula
- Overrides:
hashCode
in classRelationalConditional
-
equals
- Specified by:
equals
in interfaceSimpleLogicalFormula
- Overrides:
equals
in classRelationalConditional
-