Package net.sf.tweety.arg.prob.syntax
Class ProbabilisticArgumentationFramework
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<Argument,DungSignature>
-
- net.sf.tweety.arg.dung.syntax.DungTheory
-
- net.sf.tweety.arg.prob.syntax.ProbabilisticArgumentationFramework
-
- All Implemented Interfaces:
java.lang.Comparable<DungTheory>
,java.lang.Iterable<Argument>
,java.util.Collection<Argument>
,BeliefBase
,Graph<Argument>
public class ProbabilisticArgumentationFramework extends DungTheory
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 net.sf.tweety.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Fields inherited from interface net.sf.tweety.graphs.Graph
IGNORE_SELFLOOPS, INVERT_SELFLOOPS, REMOVE_SELFLOOPS
-
-
Constructor Summary
Constructors Constructor Description ProbabilisticArgumentationFramework()
Default constructor; initializes empty sets of arguments and attacksProbabilisticArgumentationFramework(Graph<Argument> graph)
Creates a new PAF from the given graph, all arguments and attacks have probability 1.
-
Method Summary
Modifier and Type Method Description boolean
add(Argument a)
Adds the given node to this graph.boolean
add(Argument a, Probability p)
Adds the given argument with the given probabilityboolean
add(Attack att)
Adds the given attack to this dung theory.boolean
add(Attack att, Probability p)
Adds the given attack with the given probabilityProbability
getProbability(Argument a)
Returns the probability of the given argument.Probability
getProbability(Attack a)
Returns the probability of the given attack.Probability
getProbability(DungTheory aaf)
Computes the probability of the given AAF wrt.SubgraphProbabilityFunction
getSubgraphProbabilityFunction()
Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.boolean
isWeightedGraph()
Checks whether this graph only contains weighted edges.boolean
remove(Argument a)
Removes the argument and all its attacksboolean
remove(Attack attack)
Removes the given attack from this Dung theory.DungTheory
sample()
Samples a random DungTheory from this framework wrt.java.lang.String
toString()
-
Methods inherited from class net.sf.tweety.arg.dung.syntax.DungTheory
add, add, add, addAllAttacks, addAttack, areAdjacent, compareTo, contains, containsAll, containsAttack, containsCycle, equals, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttackers, getAttacks, getChildren, getComplementGraph, getComponents, getEdge, getEdges, getInducedSubgraphs, getMinimalSignature, getNeighbors, getNodes, getNumberOfNodes, getParents, getRestriction, getStronglyConnectedComponents, getSubgraphs, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isSupport, isWellFounded, prettyPrint, removeAll
-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, addAll, clear, getSignature, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray
-
-
-
-
Method Detail
-
add
public boolean add(Attack att)
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
public boolean add(Attack att, Probability p)
Adds the given attack with the given probability- Parameters:
att
- some attackp
- some probability- Returns:
- "true" iff this object was actually changed
-
add
public boolean add(Argument a)
Description copied from interface:Graph
Adds the given node to this graph.
-
add
public boolean add(Argument a, Probability p)
Adds the given argument with the given probability- Parameters:
a
- some argumentp
- some probability- Returns:
- "true" iff this object was actually changed
-
remove
public boolean remove(Attack attack)
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
public boolean remove(Argument a)
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
public Probability getProbability(Argument a)
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
public Probability getProbability(Attack a)
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
public Probability getProbability(DungTheory aaf)
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
public SubgraphProbabilityFunction 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
public DungTheory 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
public java.lang.String toString()
- Specified by:
toString
in interfaceBeliefBase
- Specified by:
toString
in interfaceGraph<Argument>
- Overrides:
toString
in classDungTheory
-
-