Class RuleComparator<T extends Invertable>
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<R,T>
org.tweetyproject.comparator.GeneralComparator<InferenceRule<T>,AspicArgumentationTheory<T>>
org.tweetyproject.arg.aspic.order.RuleComparator<T>
- Type Parameters:
T- is the type of the language that the ASPIC theory's rules range over
- All Implemented Interfaces:
Comparator<InferenceRule<T>>,Interpretation<AspicArgumentationTheory<T>,InferenceRule<T>>
public class RuleComparator<T extends Invertable>
extends GeneralComparator<InferenceRule<T>,AspicArgumentationTheory<T>>
- Author:
- Nils Geilen A simple comparator, that compares inference rules
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(InferenceRule<T> o1, InferenceRule<T> o2) booleanbooleanisIncomparable(InferenceRule<T> a, InferenceRule<T> b) Returns "true" iff a and b are incomparable (i.e.booleanReturns "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.booleansatisfies(AspicArgumentationTheory<T> beliefBase) Checks whether this interpretation satisfies the given knowledge base.booleansatisfies(InferenceRule<T> formula) Checks whether this interpretation satisfies the given formula.Methods inherited from class org.tweetyproject.comparator.GeneralComparator
getMaximallyAcceptedArguments, getMinimallyAcceptedArguments, isEquallyAcceptableThan, isEquivalent, isStrictlyLessAcceptableThan, isStrictlyMoreAcceptableThan, isStrictlyMoreOrEquallyAcceptableThanMethods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfiesMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
RuleComparator
Constructs a new comparator for rules- Parameters:
rules- rules in ascending order
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends Invertable>- Overrides:
comparein classGeneralComparator<InferenceRule<T extends Invertable>,AspicArgumentationTheory<T extends Invertable>>
-
satisfies
Description copied from interface:InterpretationChecks 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:InterpretationChecks 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:GeneralComparatorReturns "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:
isStrictlyLessOrEquallyAcceptableThanin classGeneralComparator<InferenceRule<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:GeneralComparatorReturns "true" iff a and b are incomparable (i.e. this ranking is a partial ranking).- Specified by:
isIncomparablein classGeneralComparator<InferenceRule<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()- Specified by:
containsIncomparableArgumentsin classGeneralComparator<InferenceRule<T extends Invertable>,AspicArgumentationTheory<T extends Invertable>> - Returns:
- true if this ranking contains incomparable arguments, false otherwise
-