public class RelationalRankingFunction
extends net.sf.tweety.commons.AbstractInterpretation
| Modifier and Type | Field and Description |
|---|---|
static Integer |
INFINITY
Integer used to define infinity.
|
| Constructor and Description |
|---|
RelationalRankingFunction(net.sf.tweety.logics.fol.syntax.FolSignature signature)
Creates a new ranking function mapping each
given interpretation to zero.
|
| Modifier and Type | Method and Description |
|---|---|
Set<net.sf.tweety.logics.fol.semantics.HerbrandInterpretation> |
getPossibleInterpretations()
Returns all interpretations that are mapped to a rank
unequal to INFINITY.
|
void |
normalize()
Normalizes this OCF, i.e.
|
Integer |
numFalsifiedInstances(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w,
RelationalConditional rc)
Returns the number of instances of "rc" that are falsified by
the given interpretation.
|
Integer |
numVerifiedInstances(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w,
RelationalConditional rc)
Returns the number of instances of "rc" that are verified by
the given interpretation.
|
Integer |
rank(net.sf.tweety.logics.fol.syntax.FolFormula formula)
Gets the rank of the given sentence (ground formula).
|
Integer |
rank(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w)
Gets the rank of the given Herbrand interpretation.
|
boolean |
satisfies(net.sf.tweety.commons.BeliefBase beliefBase) |
boolean |
satisfies(net.sf.tweety.commons.Formula formula) |
void |
setRank(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w,
Integer value)
Sets the rank for the given Herbrand interpretation.
|
String |
toString() |
public static final Integer INFINITY
public RelationalRankingFunction(net.sf.tweety.logics.fol.syntax.FolSignature signature)
signature - the signature of the language this ranking function
is defined on.public Integer rank(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w) throws IllegalArgumentException
w - a Herbrand interpretation.IllegalArgumentException - if the given Herbrand interpretation has no
rank in this ranking function.public void setRank(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w,
Integer value)
w - a Herbrand interpretation.value - the rank for the Herbrand interpretation.public Integer rank(net.sf.tweety.logics.fol.syntax.FolFormula formula) throws IllegalArgumentException
formula - a formula.IllegalArgumentException - if the languages of the formula does not correspond to the language of the
interpretations this ranking function is defined on or the formula is not a sentence.public boolean satisfies(net.sf.tweety.commons.Formula formula)
throws IllegalArgumentException
IllegalArgumentExceptionpublic boolean satisfies(net.sf.tweety.commons.BeliefBase beliefBase)
throws IllegalArgumentException
IllegalArgumentExceptionpublic void normalize()
public Set<net.sf.tweety.logics.fol.semantics.HerbrandInterpretation> getPossibleInterpretations()
public Integer numFalsifiedInstances(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w, RelationalConditional rc)
w - a Herbrand interpretation.rc - a relational conditional.public Integer numVerifiedInstances(net.sf.tweety.logics.fol.semantics.HerbrandInterpretation w, RelationalConditional rc)
w - a Herbrand interpretation.rc - a relational conditional.Copyright © 2018. All rights reserved.