Class ProbabilisticArgumentationFramework
java.lang.Object
org.tweetyproject.commons.BeliefSet<Argument,DungSignature>
org.tweetyproject.arg.dung.syntax.DungTheory
org.tweetyproject.arg.prob.syntax.ProbabilisticArgumentationFramework
- All Implemented Interfaces:
Comparable<DungTheory>
,Iterable<Argument>
,Collection<Argument>
,ArgumentationFramework<Argument>
,BeliefBase
,GeneralGraph<Argument>
,Graph<Argument>
This class implements the probabilistic argumentation framework approach
of [Li, Oren, Norman. Probabilistic Argumentation Frameworks. TAFA'2011].
- Author:
- Matthias Thimm
-
Field Summary
Fields 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
ConstructorDescriptionDefault constructor; initializes empty sets of arguments and attacksCreates a new PAF from the given graph, all arguments and attacks have probability 1. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds the given node to this graph.boolean
add
(Argument a, Probability p) Adds the given argument with the given probabilityboolean
Adds the given attack to this dung theory.boolean
add
(Attack att, Probability p) Adds the given attack with the given probabilityReturns the probability of the given argument.Returns the probability of the given attack.getProbability
(DungTheory aaf) Computes the probability of the given AAF wrt.Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.boolean
Checks whether this graph only contains weighted edges.boolean
Removes the argument and all its attacksboolean
Removes the given attack from this Dung theory.sample()
Samples a random DungTheory from this framework wrt.toString()
Methods inherited from class org.tweetyproject.arg.dung.syntax.DungTheory
add, add, add, addAllAttacks, addAttack, 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, isWellFounded, prettyPrint, removeAll
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
-
Constructor Details
-
ProbabilisticArgumentationFramework
public ProbabilisticArgumentationFramework()Default constructor; initializes empty sets of arguments and attacks -
ProbabilisticArgumentationFramework
-
-
Method Details
-
add
Description copied from class:DungTheory
Adds the given attack to this dung theory.- Overrides:
add
in classDungTheory
- Parameters:
att
- an attack- Returns:
- "true" if the set of attacks has been modified.
-
add
Adds the given attack with the given probability- Parameters:
att
- some attackp
- some probability- Returns:
- "true" iff this object was actually changed
-
add
Description copied from interface:Graph
Adds the given node to this graph.- Specified by:
add
in interfaceCollection<Argument>
- Specified by:
add
in interfaceGraph<Argument>
- Overrides:
add
in classDungTheory
- Parameters:
a
- some node.- Returns:
- "true" iff the edge has been added successfully.
-
add
Adds the given argument with the given probability- Parameters:
a
- some argumentp
- some probability- Returns:
- "true" iff this object was actually changed
-
remove
Description copied from class:DungTheory
Removes the given attack from this Dung theory.- Overrides:
remove
in classDungTheory
- Parameters:
attack
- an attack- Returns:
- "true" if the set of attacks has been modified.
-
remove
Description copied from class:DungTheory
Removes the argument and all its attacks- Overrides:
remove
in classDungTheory
- Parameters:
a
- some argument- Returns:
- true if this structure has been changed
-
getProbability
Returns the probability of the given argument. If this framework does not contain the given argument, an IllegalArgumentException is thrown.- Parameters:
a
- some argument- Returns:
- the probability of the argument.
-
getProbability
Returns the probability of the given attack. If this framework does not contain the given attack, an IllegalArgumentException is thrown.- Parameters:
a
- some attack- Returns:
- the probability of the attack.
-
getProbability
Computes the probability of the given AAF wrt. this framework (if the given AAF is not a subgraph of this framework, it has probability zero).- Parameters:
aaf
- some AAF (supposedly a subgraph of this framework)- Returns:
- the probability of the given AAF.
-
getSubgraphProbabilityFunction
Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.- Returns:
- the subgraph probability function of this framework.
-
sample
Samples a random DungTheory from this framework wrt. the probabilities of its elements and assuming independence.- Returns:
- a sampled DungTheory.
-
isWeightedGraph
public boolean isWeightedGraph()Description copied from interface:Graph
Checks whether this graph only contains weighted edges.- Specified by:
isWeightedGraph
in interfaceGraph<Argument>
- Overrides:
isWeightedGraph
in classDungTheory
- Returns:
- "true" if all edges are weighted in this graph.
-
toString
- Specified by:
toString
in interfaceBeliefBase
- Specified by:
toString
in interfaceGraph<Argument>
- Overrides:
toString
in classDungTheory
-