Class TuplesRankingReasoner
- java.lang.Object
-
- net.sf.tweety.arg.rankings.reasoner.AbstractRankingReasoner<LatticeArgumentRanking>
-
- net.sf.tweety.arg.rankings.reasoner.TuplesRankingReasoner
-
- All Implemented Interfaces:
ModelProvider<Argument,DungTheory,LatticeArgumentRanking>
,PostulateEvaluatable<Argument>
public class TuplesRankingReasoner extends AbstractRankingReasoner<LatticeArgumentRanking>
This class implements the "tuples*" argument ranking approach as proposed by [Cayrol, Lagasquie-Schiex. Graduality in argumentation. 2005]. It takes into account all the ancestors branches of an arguument stored in tupled values. Some arguments are incomparable using this approach, i.e. it generates partial rankings.
Note: This implementation only works for acyclic argument graphs. For cyclic graphs null is returned.- Author:
- Anna Gessler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
TuplesRankingReasoner.LexicographicTupleComparator
Compares tuples according to the lexicographic ordering as described in [Cayrol, Lagasquie-Schiex.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Argument,Pair<int[],int[]>>
tupled_values
Stores the tupled values computed by this reasoner for lookup.
-
Constructor Summary
Constructors Constructor Description TuplesRankingReasoner()
-
Method Summary
Modifier and Type Method Description Pair<int[],int[]>
computeTupledValue(Argument a, DungTheory kb)
Computes the tupled value for the given argument.LatticeArgumentRanking
getModel(DungTheory kb)
Returns a single (dedicated) model of the given belief base.java.util.Collection<LatticeArgumentRanking>
getModels(DungTheory bbase)
Returns a characterizing model of the given belief baseprivate double
getTrueTupleSize(int[] l)
Returns the true tuple size, i.e.java.util.Map<Argument,Pair<int[],int[]>>
getTupledValues()
java.lang.String
prettyPrintTupledValues()
Prints the tupled values computed by previous calls of getModel oder getModels in a human-readable way.
-
-
-
Method Detail
-
getModels
public java.util.Collection<LatticeArgumentRanking> getModels(DungTheory bbase)
Description copied from interface:ModelProvider
Returns a characterizing model of the given belief base- Parameters:
bbase
- some belief base- Returns:
- the (selected) models of the belief base
-
getModel
public LatticeArgumentRanking getModel(DungTheory kb)
Description copied from interface:ModelProvider
Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.- Parameters:
kb
- some belief base- Returns:
- a selected model of the belief base.
-
getTrueTupleSize
private double getTrueTupleSize(int[] l)
Returns the true tuple size, i.e. infinity iff the tuple contains only 0 (a placeholder for an infinite number of zeroes in this implementation), or the length of the array in all other cases.- Parameters:
l
- tuple represented by an array of integers- Returns:
- true size of the tuple
-
computeTupledValue
public Pair<int[],int[]> computeTupledValue(Argument a, DungTheory kb)
Computes the tupled value for the given argument.- Parameters:
a
- an argumentkb
- DungTheory- Returns:
- a pair that consists of the two tuples that represent the defense (first tuple) and attack (second tuple) branches of a.
-
getTupledValues
public java.util.Map<Argument,Pair<int[],int[]>> getTupledValues()
- Returns:
- the tupled values computed by previous calls of getModel oder getModels
-
prettyPrintTupledValues
public java.lang.String prettyPrintTupledValues()
Prints the tupled values computed by previous calls of getModel oder getModels in a human-readable way.- Returns:
- a string representation of the tuples
-
-