Class SimpleAspicOrder<T extends Invertable>
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<AspicArgumentationTheory<T>,AspicArgument<T>>
org.tweetyproject.comparator.GeneralComparator<AspicArgument<T>,AspicArgumentationTheory<T>>
org.tweetyproject.arg.aspic.order.SimpleAspicOrder<T>
- Type Parameters:
T
- is the type of the language that the ASPIC theory's rules range over
- All Implemented Interfaces:
Comparator<AspicArgument<T>>
,Interpretation<AspicArgumentationTheory<T>,
AspicArgument<T>>
public class SimpleAspicOrder<T extends Invertable>
extends GeneralComparator<AspicArgument<T>,AspicArgumentationTheory<T>>
- Author:
- Nils Geilen A simple comparator for Aspic Arguments, that compares their top rules according to a given list of rules
-
Constructor Summary
ConstructorDescriptionCreates a comparator for AspicArguments, that always returns 0SimpleAspicOrder
(List<String> rules) Creates a comparator for AspicArguments from a list of AspicInferneceRules This will return a value <0, ==0 or >0 if the first argument's top rule is <,=,> the second argument's top rule -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(AspicArgument<T> a, AspicArgument<T> b) boolean
Return true if this ranking contains incomparable arguments, false otherwiseboolean
isIncomparable
(AspicArgument<T> a, AspicArgument<T> 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.boolean
satisfies
(AspicArgument<T> formula) Checks whether this interpretation satisfies the given formula.boolean
satisfies
(AspicArgumentationTheory<T> beliefBase) Checks whether this interpretation satisfies the given knowledge base.toString()
Methods inherited from class org.tweetyproject.comparator.GeneralComparator
getMaximallyAcceptedArguments, getMinimallyAcceptedArguments, isEquallyAcceptableThan, isEquivalent, isStrictlyLessAcceptableThan, isStrictlyMoreAcceptableThan, isStrictlyMoreOrEquallyAcceptableThan
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
-
Constructor Details
-
SimpleAspicOrder
public SimpleAspicOrder()Creates a comparator for AspicArguments, that always returns 0 -
SimpleAspicOrder
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<T extends Invertable>
- Overrides:
compare
in classGeneralComparator<AspicArgument<T extends Invertable>,
AspicArgumentationTheory<T extends Invertable>>
-
toString
-
satisfies
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given formula.- Parameters:
formula
- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
IllegalArgumentException
- if the formula does not correspond to the expected language.
-
satisfies
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Parameters:
beliefBase
- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
- Throws:
IllegalArgumentException
- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
isStrictlyLessOrEquallyAcceptableThan
Description copied from class:GeneralComparator
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)- Specified by:
isStrictlyLessOrEquallyAcceptableThan
in classGeneralComparator<AspicArgument<T extends Invertable>,
AspicArgumentationTheory<T extends Invertable>> - Parameters:
a
- some comparable elementb
- some comparable element- Returns:
- "true" iff a is strictly less acceptable than b or a is equally acceptable as b
-
isIncomparable
Description copied from class:GeneralComparator
Returns "true" iff a and b are incomparable (i.e. this ranking is a partial ranking).- Specified by:
isIncomparable
in classGeneralComparator<AspicArgument<T extends Invertable>,
AspicArgumentationTheory<T extends Invertable>> - Parameters:
a
- comparable elementb
- comparable element- Returns:
- "true" iff a and b are incomparable
-
containsIncomparableArguments
public boolean containsIncomparableArguments()Description copied from class:GeneralComparator
Return true if this ranking contains incomparable arguments, false otherwise- Specified by:
containsIncomparableArguments
in classGeneralComparator<AspicArgument<T extends Invertable>,
AspicArgumentationTheory<T extends Invertable>> - Returns:
- true if this ranking contains incomparable arguments, false otherwise
-