public class RankingFunction extends AbstractInterpretation<ClBeliefSet,Conditional>
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
INFINITY
Integer used to define infinity.
|
private java.util.Map<PossibleWorld,java.lang.Integer> |
ranks
The ranks of the possible worlds.
|
private PropositionalSignature |
signature
The signature of the language this ranking function
is defined on.
|
Constructor and Description |
---|
RankingFunction(PropositionalSignature signature)
Creates a new ranking function mapping each
given interpretation to zero.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
static boolean |
falsifies(PossibleWorld w,
Conditional c)
Checks whether the given possible world w falsifies the given
conditional (B|A), i.e.
|
void |
forceStrictness(java.util.Set<PropositionalFormula> formulas)
Sets the rank of every interpretation i that does not satisfy
the given set of formulas to RankingFunction.INFINITY.
|
java.util.Set<PossibleWorld> |
getPossibleWorlds()
Returns all interpretations that are mapped to a rank
unequal to INFINITY.
|
PropositionalSignature |
getSignature()
Returns the signature of the first-order language this ranking function
is defined on.
|
boolean |
isNormalized()
Checkes whether this OCF is normalized, i.e.
|
private java.lang.Integer |
minimalRank()
Returns the minimal rank of this OCF.
|
void |
normalize()
Normalizes this OCF, i.e.
|
java.lang.Integer |
rank(PossibleWorld w)
Gets the rank of the given possible world.
|
java.lang.Integer |
rank(PropositionalFormula formula)
Gets the rank of the given formula.
|
boolean |
satisfies(ClBeliefSet beliefBase)
Checks whether this interpretation satisfies the given knowledge base.
|
boolean |
satisfies(Conditional formula)
Checks whether this interpretation satisfies the given formula.
|
static boolean |
satisfies(PossibleWorld w,
Conditional c)
Checks whether the given possible world w satisfies the given
conditional (B|A), i.e.
|
void |
setRank(PossibleWorld w,
java.lang.Integer value)
Sets the rank for the given possible world.
|
java.lang.String |
toString() |
static boolean |
verifies(PossibleWorld w,
Conditional c)
Checks whether the given possible world w verifies the given
conditional (B|A), i.e.
|
satisfies
public static final java.lang.Integer INFINITY
private java.util.Map<PossibleWorld,java.lang.Integer> ranks
private PropositionalSignature signature
public RankingFunction(PropositionalSignature signature)
signature
- the signature of the language this ranking function
is defined on.public java.lang.Integer rank(PossibleWorld w) throws java.lang.IllegalArgumentException
w
- an possible world.java.lang.IllegalArgumentException
- if the given possible world has no
rank in this ranking function.public void setRank(PossibleWorld w, java.lang.Integer value)
w
- an possible world.value
- the rank for the possible world.public boolean satisfies(Conditional formula) throws java.lang.IllegalArgumentException
Interpretation
formula
- a formula .java.lang.IllegalArgumentException
- if the formula does not correspond
to the expected language.public boolean satisfies(ClBeliefSet beliefBase)
Interpretation
beliefBase
- a knowledge base.public void forceStrictness(java.util.Set<PropositionalFormula> formulas)
formulas
- a set of first-order formulas.public java.lang.Integer rank(PropositionalFormula formula) throws java.lang.IllegalArgumentException
formula
- a formula.java.lang.IllegalArgumentException
- if the languages of the formula does not correspond to the language of the
interpretations this ranking function is defined on.private java.lang.Integer minimalRank()
public void normalize()
public boolean isNormalized()
public java.util.Set<PossibleWorld> getPossibleWorlds()
public PropositionalSignature getSignature()
public static boolean verifies(PossibleWorld w, Conditional c)
w
- a possible worldc
- a conditional.public static boolean falsifies(PossibleWorld w, Conditional c)
w
- a possible worldc
- a conditional.public static boolean satisfies(PossibleWorld w, Conditional c)
w
- a possible worldc
- a conditional.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object