public class MlnFormula
extends net.sf.tweety.logics.commons.syntax.RelationalFormula
| Constructor and Description |
|---|
MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula)
Creates a new strict MLN formula with the given formula.
|
MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula,
Double weight)
Creates a new MLN formula with the given formula and weight.
|
MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula,
net.sf.tweety.math.probability.Probability p)
Creates a new MLN formula and estimates its weight w by the given
probability p using the formula w = log(p/(1-p)*f) where "f" is the
ratio of the number of worlds not satisfying the formula and the
worlds satisfying the formula.
|
| Modifier and Type | Method and Description |
|---|---|
net.sf.tweety.logics.commons.syntax.RelationalFormula |
clone() |
net.sf.tweety.logics.fol.syntax.Conjunction |
combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable f) |
net.sf.tweety.logics.fol.syntax.Disjunction |
combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f) |
net.sf.tweety.logics.commons.syntax.RelationalFormula |
complement() |
boolean |
containsQuantifier() |
Set<net.sf.tweety.logics.fol.syntax.FOLAtom> |
getAtoms() |
net.sf.tweety.logics.fol.syntax.FolFormula |
getFormula()
Returns the inner formula.
|
Set<net.sf.tweety.logics.commons.syntax.Functor> |
getFunctors() |
Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicates() |
Set<net.sf.tweety.logics.commons.syntax.Variable> |
getQuantifierVariables() |
net.sf.tweety.logics.fol.syntax.FolSignature |
getSignature() |
Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
getTerms(Class<C> cls) |
Set<net.sf.tweety.logics.commons.syntax.Variable> |
getUnboundVariables() |
net.sf.tweety.math.probability.Probability |
getUniformProbability() |
Double |
getWeight()
Returns the weight.
|
boolean |
isClosed() |
boolean |
isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables) |
boolean |
isLiteral() |
boolean |
isStrict()
Returns "true" iff this formula is strict.
|
boolean |
isWellBound() |
boolean |
isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables) |
net.sf.tweety.logics.commons.syntax.RelationalFormula |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) |
String |
toString() |
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substitutepublic MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula)
formula - the first-order formula.public MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula,
Double weight)
formula - the first-order formula.weight - the weight of the formula (null means that the formula is strict).public MlnFormula(net.sf.tweety.logics.fol.syntax.FolFormula formula,
net.sf.tweety.math.probability.Probability p)
formula - the first-order formula.p - the intended probability of the formula.public net.sf.tweety.logics.fol.syntax.Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable f)
combineWithAnd in interface net.sf.tweety.logics.commons.syntax.interfaces.ConjuctablecombineWithAnd in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic net.sf.tweety.logics.fol.syntax.Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)
combineWithOr in interface net.sf.tweety.logics.commons.syntax.interfaces.DisjunctablecombineWithOr in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic net.sf.tweety.logics.commons.syntax.RelationalFormula complement()
complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertablecomplement in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic Set<? extends net.sf.tweety.logics.commons.syntax.Predicate> getPredicates()
public Set<net.sf.tweety.logics.fol.syntax.FOLAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulagetAtoms in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic boolean containsQuantifier()
public net.sf.tweety.logics.commons.syntax.RelationalFormula substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulasubstitute in class net.sf.tweety.logics.commons.syntax.RelationalFormulaIllegalArgumentExceptionpublic Set<net.sf.tweety.logics.commons.syntax.Variable> getUnboundVariables()
public boolean isClosed()
public boolean isClosed(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
public boolean isWellBound()
public boolean isWellBound(Set<net.sf.tweety.logics.commons.syntax.Variable> boundVariables)
public String toString()
toString in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
getFunctors in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic net.sf.tweety.logics.fol.syntax.FolFormula getFormula()
getFormula in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulagetFormula in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic Double getWeight()
public boolean isStrict()
public net.sf.tweety.math.probability.Probability getUniformProbability()
getUniformProbability in interface net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAwaregetUniformProbability in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic boolean isLiteral()
public Set<net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> getTerms()
public <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> Set<C> getTerms(Class<C> cls)
public Set<net.sf.tweety.logics.commons.syntax.Variable> getQuantifierVariables()
public net.sf.tweety.logics.commons.syntax.RelationalFormula clone()
clone in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulaclone in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulaclone in class net.sf.tweety.logics.commons.syntax.RelationalFormulapublic net.sf.tweety.logics.fol.syntax.FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.FormulagetSignature in class net.sf.tweety.logics.commons.syntax.RelationalFormulaCopyright © 2018. All rights reserved.