Class CountingUtilityFunction
- java.lang.Object
-
- net.sf.tweety.agents.dialogues.structured.CountingUtilityFunction
-
- All Implemented Interfaces:
UtilityFunction
public class CountingUtilityFunction extends java.lang.Object implements UtilityFunction
This class represents a counting utility function, i.e. a function that ranks a set of propositions to the number of common propositions with this function's focal set.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description CountingUtilityFunction(java.util.Collection<? extends Proposition> focalSet)
Creates a new counting utility function for the given focal set.
-
Method Summary
Modifier and Type Method Description int
rank(java.util.Collection<? extends Proposition> propositions)
Rank the given collection of propositions.
-
-
-
Constructor Detail
-
CountingUtilityFunction
public CountingUtilityFunction(java.util.Collection<? extends Proposition> focalSet)
Creates a new counting utility function for the given focal set.- Parameters:
focalSet
- a collection of propositions.
-
-
Method Detail
-
rank
public int rank(java.util.Collection<? extends Proposition> propositions)
Description copied from interface:UtilityFunction
Rank the given collection of propositions. A set S is preferred to a set T if rank(S)>rank(T).- Specified by:
rank
in interfaceUtilityFunction
- Parameters:
propositions
- a collection of propositions.- Returns:
- the rank of the given collection.
-
-