Package net.sf.tweety.arg.delp.semantics
Class GeneralizedSpecificity
- java.lang.Object
-
- net.sf.tweety.arg.delp.semantics.ComparisonCriterion
-
- net.sf.tweety.arg.delp.semantics.GeneralizedSpecificity
-
public final class GeneralizedSpecificity extends ComparisonCriterion
This class implements the generalized specificity criterion used to compare two arguments. Using this criterion, an argument is more specific (better) than another argument if the former uses more facts or less rules.
See
[1] Stolzenburg, F. and Garcia, A. and Chesnevar, Carlos I. and Simari, Guillermo R.. Computing Generalized Specificity. In Journal of Non-Classical Logics, 2003. Volume 13(1):87-113.
for more information.- Author:
- Matthias Thimm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
GeneralizedSpecificity.ActSetType
-
Nested classes/interfaces inherited from class net.sf.tweety.arg.delp.semantics.ComparisonCriterion
ComparisonCriterion.Factory, ComparisonCriterion.Result
-
-
Constructor Summary
Constructors Constructor Description GeneralizedSpecificity()
-
Method Summary
Modifier and Type Method Description private boolean
actSetTest(java.util.Set<java.util.Set<FolFormula>> ntActSets, DelpArgument arg, DefeasibleLogicProgram delp)
Test whether all given activation sets activate the given argument.ComparisonCriterion.Result
compare(DelpArgument argument1, DelpArgument argument2, DefeasibleLogicProgram context)
This method returns the relation ofargument1
toargument2
givencontext
.private boolean
isActivated(DelpArgument arg, java.util.Set<FolFormula> activationSet, DefeasibleLogicProgram delp)
Test whether the given argument is activated by the given activation set.private java.util.Set<java.util.Set<FolFormula>>
ntActSets(java.util.Set<ArgumentCompletion> argumentCompletions)
Computes the activation sets of all given argument completionsprivate java.util.Set<java.util.Set<FolFormula>>
ntActSets(ArgumentCompletion argument)
Computes the activation sets of the given argument completion.
-
-
-
Method Detail
-
compare
public ComparisonCriterion.Result compare(DelpArgument argument1, DelpArgument argument2, DefeasibleLogicProgram context)
Description copied from class:ComparisonCriterion
This method returns the relation ofargument1
toargument2
givencontext
.- Specified by:
compare
in classComparisonCriterion
- Parameters:
argument1
- a DeLP argumentargument2
- a DeLP argumentcontext
- a defeasible logic program as context- Returns:
- Result.IS_BETTER iffargument1
is better thanargument2
- Result.IS_WORSE iffargument1
is worse thanargument2
- Result.IS_EQUAL iffargument1
andargument2
are in the same equivalence class
- Result.NOT_COMPARABLE iffargument1
andargument2
are not comparable
-
ntActSets
private java.util.Set<java.util.Set<FolFormula>> ntActSets(ArgumentCompletion argument)
Computes the activation sets of the given argument completion. See [1] for an explanation of the algorithm.- Parameters:
argument
- an argument completion- Returns:
- the set of activation sets of
argument
-
ntActSets
private java.util.Set<java.util.Set<FolFormula>> ntActSets(java.util.Set<ArgumentCompletion> argumentCompletions)
Computes the activation sets of all given argument completions- Parameters:
argumentCompletions
- a set of argument completions- Returns:
- the set of all activation sets for all argument completions
-
actSetTest
private boolean actSetTest(java.util.Set<java.util.Set<FolFormula>> ntActSets, DelpArgument arg, DefeasibleLogicProgram delp)
Test whether all given activation sets activate the given argument.- Parameters:
ntActSets
- a set of activation setsarg
- a DeLP argumentdelp
- a defeasible logic program- Returns:
true iff all activation sets activate the given argument
-
isActivated
private boolean isActivated(DelpArgument arg, java.util.Set<FolFormula> activationSet, DefeasibleLogicProgram delp)
Test whether the given argument is activated by the given activation set.- Parameters:
arg
- a DeLP argumentactivationSet
- an activation setdelp
- a defeasible logic program- Returns:
true iff the argument gets activated by the given activation set
-
-