Class NumericalArgumentRanking
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<T,Argument>
org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation<DungTheory>
org.tweetyproject.arg.rankings.semantics.ArgumentRanking
org.tweetyproject.arg.rankings.semantics.NumericalArgumentRanking
- All Implemented Interfaces:
Comparator<Argument>
,Map<Argument,
,Double> Interpretation<DungTheory,
Argument>
This class provides an acceptability interpretation of arguments by assigning
them real values. Often larger values indicate more acceptability, but some
semantics use other ways of ranking the values.
- Author:
- Matthias Thimm, Anna Gessler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Possible sorting types for the numerical values. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic double
Precision for comparing values.The method used for ordering the numerical values according to acceptability. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty numerical argument ranking.NumericalArgumentRanking
(Collection<Argument> args, double initialvalue) Creates a new argument ranking with the given set of arguments and the given initial ranking value. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
boolean
containsKey
(Object arg0) boolean
containsValue
(Object arg0) entrySet()
getArgumentsOfStatus
(ArgumentStatus status) Returns all arguments that have the given status in this interpretation.boolean
isEmpty()
boolean
isIncomparable
(Argument a, Argument b) Returns "true" iff a and b are incomparable (i.e.boolean
Returns "true" iff a is strictly less acceptable than b or a is equally acceptable as b or a and b are not comparable, i.e.keySet()
void
void
setSortingType
(NumericalArgumentRanking.SortingType sortingType) Set the sorting type for ranking values.int
size()
toString()
values()
Methods inherited from class org.tweetyproject.arg.rankings.semantics.ArgumentRanking
compare, getMaximallyAcceptedArguments, getMinimallyAcceptedArguments, isEquallyAcceptableThan, isEquivalent, isStrictlyLessAcceptableThan, isStrictlyMoreAcceptableThan, isStrictlyMoreOrEquallyAcceptableThan
Methods inherited from class org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation
satisfies, satisfies
Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfies
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
PRECISION
public static double PRECISIONPrecision for comparing values. -
sortingType
The method used for ordering the numerical values according to acceptability.
-
-
Constructor Details
-
NumericalArgumentRanking
public NumericalArgumentRanking()Creates a new empty numerical argument ranking. -
NumericalArgumentRanking
Creates a new argument ranking with the given set of arguments and the given initial ranking value.- Parameters:
args
- some set of argumentsinitialvalue
- an initial value that will be assigned to all arguments
-
-
Method Details
-
isStrictlyLessOrEquallyAcceptableThan
Description copied from class:ArgumentRanking
Returns "true" iff a is strictly less acceptable than b or a is equally acceptable as b or a and b are not comparable, i.e. a >= b (or a ~ b) (least arguments are maximally acceptable arguments)- Specified by:
isStrictlyLessOrEquallyAcceptableThan
in classArgumentRanking
- Parameters:
a
- some argumentb
- some argument- Returns:
- "true" iff a is strictly less acceptable than b or a is equally acceptable as b
-
getArgumentsOfStatus
Description copied from class:AbstractArgumentationInterpretation
Returns all arguments that have the given status in this interpretation.- Specified by:
getArgumentsOfStatus
in classAbstractArgumentationInterpretation<DungTheory>
- Parameters:
status
- the status of the arguments to be returned.- Returns:
- the set of arguments with the given status.
-
toString
- Specified by:
toString
in classAbstractArgumentationInterpretation<DungTheory>
-
clear
public void clear() -
containsKey
- Specified by:
containsKey
in interfaceMap<Argument,
Double>
-
containsValue
- Specified by:
containsValue
in interfaceMap<Argument,
Double>
-
entrySet
-
get
-
isEmpty
public boolean isEmpty() -
keySet
-
put
-
putAll
-
remove
-
size
public int size() -
values
-
getSortingType
- Returns:
- the sorting type that is used for ranking values (descending, ascending or sorted lexicographically)
-
setSortingType
Set the sorting type for ranking values. For example, the "ascending" type means that smaller values signify a higher ranking than bigger values.- Parameters:
sortingType
- seesortingType
for a description of the available sorting methods
-
isIncomparable
Description copied from class:ArgumentRanking
Returns "true" iff a and b are incomparable (i.e. this ranking is a partial ranking).- Specified by:
isIncomparable
in classArgumentRanking
- Parameters:
a
- Argumentb
- Argument- Returns:
- "true" iff a and b are incomparable
-
containsIncomparableArguments
public boolean containsIncomparableArguments()- Specified by:
containsIncomparableArguments
in classArgumentRanking
- Returns:
- true if this ranking contains incomparable arguments, false otherwise
-