Package net.sf.tweety.arg.prob.syntax
Class ProbabilisticArgumentationFramework
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<net.sf.tweety.arg.dung.syntax.Argument,net.sf.tweety.arg.dung.syntax.DungSignature>
-
- net.sf.tweety.arg.dung.syntax.DungTheory
-
- net.sf.tweety.arg.prob.syntax.ProbabilisticArgumentationFramework
-
- All Implemented Interfaces:
Comparable<net.sf.tweety.arg.dung.syntax.DungTheory>,Iterable<net.sf.tweety.arg.dung.syntax.Argument>,Collection<net.sf.tweety.arg.dung.syntax.Argument>,net.sf.tweety.commons.BeliefBase,net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
public class ProbabilisticArgumentationFramework extends net.sf.tweety.arg.dung.syntax.DungTheoryThis class implements the probabilistic argumentation framework approach of [Li, Oren, Norman. Probabilistic Argumentation Frameworks. TAFA'2011].- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description ProbabilisticArgumentationFramework()Default constructor; initializes empty sets of arguments and attacksProbabilisticArgumentationFramework(net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument> graph)Creates a new PAF from the given graph, all arguments and attacks have probability 1.
-
Method Summary
Modifier and Type Method Description booleanadd(net.sf.tweety.arg.dung.syntax.Argument a)booleanadd(net.sf.tweety.arg.dung.syntax.Argument a, net.sf.tweety.math.probability.Probability p)Adds the given argument with the given probabilitybooleanadd(net.sf.tweety.arg.dung.syntax.Attack att)booleanadd(net.sf.tweety.arg.dung.syntax.Attack att, net.sf.tweety.math.probability.Probability p)Adds the given attack with the given probabilitynet.sf.tweety.math.probability.ProbabilitygetProbability(net.sf.tweety.arg.dung.syntax.Argument a)Returns the probability of the given argument.net.sf.tweety.math.probability.ProbabilitygetProbability(net.sf.tweety.arg.dung.syntax.Attack a)Returns the probability of the given attack.net.sf.tweety.math.probability.ProbabilitygetProbability(net.sf.tweety.arg.dung.syntax.DungTheory aaf)Computes the probability of the given AAF wrt.SubgraphProbabilityFunctiongetSubgraphProbabilityFunction()Returns the complete subgraph probability function on the subgraphs of this PAF, assuming independence between probabilities of all arguments and attacks.booleanisWeightedGraph()booleanremove(net.sf.tweety.arg.dung.syntax.Argument a)booleanremove(net.sf.tweety.arg.dung.syntax.Attack attack)net.sf.tweety.arg.dung.syntax.DungTheorysample()Samples a random DungTheory from this framework wrt.StringtoString()-
Methods inherited from class net.sf.tweety.arg.dung.syntax.DungTheory
add, add, addAllAttacks, addAttack, areAdjacent, compareTo, contains, containsAll, containsAttack, containsCycle, equals, existsDirectedPath, faf, getAdjacencyMatrix, getAttacked, getAttackers, getAttacks, getChildren, getComplementGraph, getComponents, getEdge, getEdges, getMinimalSignature, getNeighbors, getNodes, getNumberOfNodes, getParents, getRestriction, getStronglyConnectedComponents, getSubgraphs, hasAttackBranch, hasDefenseBranch, hashCode, hasSelfLoops, instantiateSignature, isAttackBranch, isAttacked, isAttacked, isAttackedBy, isAttackedBy, isAttackingAllOtherArguments, isCoherent, isDefenseBranch, isIndirectAttack, isRelativelyCoherent, isStable, isSupport, isWellFounded, prettyPrint, removeAll
-
Methods inherited from class net.sf.tweety.commons.BeliefSet
addAll, clear, getSignature, instantiateSet, isEmpty, iterator, remove, retainAll, setSignature, size, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
ProbabilisticArgumentationFramework
public ProbabilisticArgumentationFramework()
Default constructor; initializes empty sets of arguments and attacks
-
ProbabilisticArgumentationFramework
public ProbabilisticArgumentationFramework(net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument> graph)
Creates a new PAF from the given graph, all arguments and attacks have probability 1.- Parameters:
graph- some graph
-
-
Method Detail
-
add
public boolean add(net.sf.tweety.arg.dung.syntax.Attack att)
- Overrides:
addin classnet.sf.tweety.arg.dung.syntax.DungTheory
-
add
public boolean add(net.sf.tweety.arg.dung.syntax.Attack att, net.sf.tweety.math.probability.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(net.sf.tweety.arg.dung.syntax.Argument a)
- Specified by:
addin interfaceCollection<net.sf.tweety.arg.dung.syntax.Argument>- Specified by:
addin interfacenet.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>- Overrides:
addin classnet.sf.tweety.arg.dung.syntax.DungTheory
-
add
public boolean add(net.sf.tweety.arg.dung.syntax.Argument a, net.sf.tweety.math.probability.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(net.sf.tweety.arg.dung.syntax.Attack attack)
- Overrides:
removein classnet.sf.tweety.arg.dung.syntax.DungTheory
-
remove
public boolean remove(net.sf.tweety.arg.dung.syntax.Argument a)
- Overrides:
removein classnet.sf.tweety.arg.dung.syntax.DungTheory
-
getProbability
public net.sf.tweety.math.probability.Probability getProbability(net.sf.tweety.arg.dung.syntax.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 net.sf.tweety.math.probability.Probability getProbability(net.sf.tweety.arg.dung.syntax.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 net.sf.tweety.math.probability.Probability getProbability(net.sf.tweety.arg.dung.syntax.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 net.sf.tweety.arg.dung.syntax.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()
- Specified by:
isWeightedGraphin interfacenet.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>- Overrides:
isWeightedGraphin classnet.sf.tweety.arg.dung.syntax.DungTheory
-
toString
public String toString()
- Specified by:
toStringin interfacenet.sf.tweety.commons.BeliefBase- Specified by:
toStringin interfacenet.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>- Overrides:
toStringin classnet.sf.tweety.arg.dung.syntax.DungTheory
-
-