Class WeightedDungTheory
java.lang.Object
org.tweetyproject.commons.BeliefSet<Argument,DungSignature>
org.tweetyproject.arg.dung.syntax.DungTheory
org.tweetyproject.arg.dung.syntax.WeightedDungTheory
- All Implemented Interfaces:
Comparable<DungTheory>
,Iterable<Argument>
,Collection<Argument>
,ArgumentationFramework<Argument>
,BeliefBase
,GeneralGraph<Argument>
,Graph<Argument>
Minimalistic Implementation of a weighted argumentation theory
used for learning argumentation theories from labelings
- Author:
- Lars Bengel
-
Field Summary
Modifier and TypeFieldDescriptionlisting of weights of every edge in the argumentation graphFields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
Fields inherited from interface org.tweetyproject.graphs.Graph
IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
add attack between both arguments to the theory and set weight to 1boolean
add attack between both arguments to the theory and set weight to given valuecompute Dung Theory only containing attacks with weights greater than zerogetDungTheory
(double threshold) compute Dung Theory only containing attacks with weight above the given thresholdreturn weight of the attack between the given argumentsreturn weight of the given attack, weight is 0 if the attack is not presentboolean
remove attack from theory and reset weightboolean
boolean
removeDiscardedAttacks
(int threshold) remove all attacks with weight < thresholdsets the weight of the given attack to the given valueupdateWeight
(Attack attack, double weight) updates the weight of the given attack with the given value and return old valueMethods inherited from class org.tweetyproject.arg.dung.syntax.DungTheory
add, add, add, add, add, addAllAttacks, areAdjacent, clone, compareTo, contains, containsAll, containsAttack, containsCycle, containsOddCycle, equals, equalsIn, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttacked, getAttackers, getAttackers, getAttacks, getBidirectionalAttacks, getChildren, getComplementGraph, getComponents, getEdge, getEdges, getInducedSubgraphs, getMinimalSignature, getNeighbors, getNodes, getNumberOfEdges, getNumberOfNodes, getParents, getReduct, getRestriction, getStronglyConnectedComponents, getSubgraphs, getUnattackedAttackers, getUndefendedAttacks, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, isAcceptable, isAdmissible, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isComplete, isConflictFree, isConflictFree, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isStronglyDefendedBy, isSupport, isWeightedGraph, isWellFounded, prettyPrint, remove, removeAll, toString
Methods inherited from class org.tweetyproject.commons.BeliefSet
add, addAll, clear, getSignature, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
weights
-
-
Constructor Details
-
WeightedDungTheory
public WeightedDungTheory()initialize a new weighted argumentation theory
-
-
Method Details
-
getWeight
-
getWeight
-
setWeight
-
updateWeight
-
getDungTheory
compute Dung Theory only containing attacks with weights greater than zero- Returns:
- computed Dung Theory
-
getDungTheory
compute Dung Theory only containing attacks with weight above the given threshold- Parameters:
threshold
- cutoff for attacks- Returns:
- Dung Theory wrt. given threshold
-
addAttack
add attack between both arguments to the theory and set weight to given value- Parameters:
attacker
- an argumentattacked
- an argumentweight
- the weight of the attack- Returns:
- "true" if attack between the arguments was added
-
addAttack
add attack between both arguments to the theory and set weight to 1- Overrides:
addAttack
in classDungTheory
- Parameters:
attacker
- an argumentattacked
- an argument- Returns:
- "true" if attack between the arguments was added
-
remove
remove attack from theory and reset weight- Overrides:
remove
in classDungTheory
- Parameters:
attack
- an attack- Returns:
- "true" if attack successfully removed
-
removeDiscardedAttacks
public boolean removeDiscardedAttacks(int threshold) remove all attacks with weight < threshold- Parameters:
threshold
- some threshold- Returns:
- "true" if all attacks were removed
-
removeDiscardedAttacks
public boolean removeDiscardedAttacks()- Returns:
- removeDiscardedAttacks
-