Class 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.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, 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 attacks
      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.
    • Method Summary

      Modifier and Type Method Description
      boolean add​(net.sf.tweety.arg.dung.syntax.Argument a)  
      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
      boolean add​(net.sf.tweety.arg.dung.syntax.Attack att)  
      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
      net.sf.tweety.math.probability.Probability getProbability​(net.sf.tweety.arg.dung.syntax.Argument a)
      Returns the probability of the given argument.
      net.sf.tweety.math.probability.Probability getProbability​(net.sf.tweety.arg.dung.syntax.Attack a)
      Returns the probability of the given attack.
      net.sf.tweety.math.probability.Probability getProbability​(net.sf.tweety.arg.dung.syntax.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()  
      boolean remove​(net.sf.tweety.arg.dung.syntax.Argument a)  
      boolean remove​(net.sf.tweety.arg.dung.syntax.Attack attack)  
      net.sf.tweety.arg.dung.syntax.DungTheory sample()
      Samples a random DungTheory from this framework wrt.
      String toString()  
      • 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 interface net.sf.tweety.graphs.Graph

        iterator
    • 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:
        add in class net.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 attack
        p - some probability
        Returns:
        "true" iff this object was actually changed
      • add

        public boolean add​(net.sf.tweety.arg.dung.syntax.Argument a)
        Specified by:
        add in interface Collection<net.sf.tweety.arg.dung.syntax.Argument>
        Specified by:
        add in interface net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        add in class net.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 argument
        p - some probability
        Returns:
        "true" iff this object was actually changed
      • remove

        public boolean remove​(net.sf.tweety.arg.dung.syntax.Attack attack)
        Overrides:
        remove in class net.sf.tweety.arg.dung.syntax.DungTheory
      • remove

        public boolean remove​(net.sf.tweety.arg.dung.syntax.Argument a)
        Overrides:
        remove in class net.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:
        isWeightedGraph in interface net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        isWeightedGraph in class net.sf.tweety.arg.dung.syntax.DungTheory
      • toString

        public String toString()
        Specified by:
        toString in interface net.sf.tweety.commons.BeliefBase
        Specified by:
        toString in interface net.sf.tweety.graphs.Graph<net.sf.tweety.arg.dung.syntax.Argument>
        Overrides:
        toString in class net.sf.tweety.arg.dung.syntax.DungTheory