Class AbstractBipolarFramework

    • Constructor Detail

      • AbstractBipolarFramework

        public AbstractBipolarFramework()
    • Method Detail

      • getDirectSupporters

        public Set<BipolarEntity> getDirectSupporters​(BArgument argument)
        Computes the set {A | (A,argument) in supports}.
        Parameters:
        argument - an argument
        Returns:
        the set of all bipolar entities that support argument.
      • getDirectSupported

        public Set<BArgument> getDirectSupported​(BipolarEntity arg)
        Computes the set {A | (argument,A) in supports}.
        Parameters:
        arg - an instance of bipolar entity
        Returns:
        the set of all arguments that are supported by argument.
      • getAttackers

        public Set<BipolarEntity> getAttackers​(BArgument argument)
        Computes the set {A | (A,argument) in attacks}.
        Parameters:
        argument - an argument
        Returns:
        the set of all bipolar entities that attack argument.
      • getAttacked

        public Set<BArgument> getAttacked​(BipolarEntity arg)
        Computes the set {A | (argument,A) in attacks}.
        Parameters:
        arg - an instance of bipolar entity
        Returns:
        the set of all arguments that are attacked by argument.
      • isAcceptable

        public abstract boolean isAcceptable​(BArgument argument,
                                             Collection<BArgument> ext)
        checks whether argument is acceptable wrt. ext
        Parameters:
        argument - some argument
        ext - a set of arguments
        Returns:
        "true" if argument is acceptable wrt. ext
      • faf

        public ArgumentSet faf​(ArgumentSet extension)
        The characteristic function of an bipolar argumentation framework: F_AF(S) = {A|A is acceptable wrt. S}.
        Parameters:
        extension - an extension (a set of arguments).
        Returns:
        an extension (a set of arguments).
      • isDirectSupportedBy

        public boolean isDirectSupportedBy​(BArgument arg1,
                                           BipolarEntity arg2)
        Checks whether arg1 is directly supported by arg2.
        Parameters:
        arg1 - an argument.
        arg2 - a bipolar entity
        Returns:
        "true" if arg1 is directly supported by arg2
      • isAttackedBy

        public boolean isAttackedBy​(BArgument arg1,
                                    BipolarEntity arg2)
        Checks whether arg1 is attacked by arg2.
        Parameters:
        arg1 - an argument.
        arg2 - a bipolar entity
        Returns:
        "true" if arg1 is directly attacked by arg2
      • getSupports

        public abstract Set<Support> getSupports()
        Returns all supports of this theory.
        Returns:
        all supports of this theory.
      • getAttacks

        public abstract Set<Attack> getAttacks()
        Returns all attacks of this theory.
        Returns:
        all attacks of this theory.
      • add

        public abstract boolean add​(Support support)
        Adds the given support to this argumentation framework.
        Parameters:
        support - a support
        Returns:
        "true" if the set of supports has been modified.
      • addAllSupports

        public boolean addAllSupports​(Collection<? extends Support> c)
        Adds the set of supports to this argumentation framework
        Parameters:
        c - a collection of supports
        Returns:
        "true" if this argumentation framework has been modified.
      • add

        public abstract boolean add​(Attack attack)
        Adds the given attack to this argumentation framework
        Parameters:
        attack - an attack
        Returns:
        "true" if the set of attacks has been modified.
      • addAllAttacks

        public boolean addAllAttacks​(Collection<? extends Attack> c)
        Adds the set of attacks to this argumentation framework
        Parameters:
        c - a collection of attacks
        Returns:
        "true" if this argumentation framework has been modified.
      • add

        protected boolean add​(AbstractBipolarFramework theory)
        Adds all arguments, attacks and supports of the given argumentation framework to this framework
        Parameters:
        theory - some abstract support framework
        Returns:
        "true" if this framework has been modified
      • add

        public boolean add​(BArgument argument)
        Adds argument to this argumentation framework
        Specified by:
        add in interface Collection<BArgument>
        Specified by:
        add in interface net.sf.tweety.graphs.Graph<BArgument>
        Overrides:
        add in class net.sf.tweety.commons.BeliefSet<BArgument,​net.sf.tweety.arg.dung.syntax.DungSignature>
        Parameters:
        argument - some argument
        Returns:
        "true" if this framework has been modified
      • add

        public boolean add​(net.sf.tweety.arg.dung.syntax.Argument argument)
        Adds argument to this argumentation framework for better compatibility between dung theories and bipolar argumentation frameworks
        Parameters:
        argument - some argument
        Returns:
        "true" if this framework has been modified
      • remove

        public boolean remove​(Support support)
        Removes the given support from this argumentation framework.
        Parameters:
        support - a support
        Returns:
        "true" if the set of supports has been modified.
      • remove

        public boolean remove​(Attack attack)
        Removes the given attack from this argumentation framework.
        Parameters:
        attack - an attack
        Returns:
        "true" if the set of supports has been modified.
      • remove

        public boolean remove​(BArgument a)
        Removes the argument and all its attacks and supports
        Parameters:
        a - some argument
        Returns:
        true if this structure has been changed
      • removeAll

        public boolean removeAll​(Collection<?> c)
        Specified by:
        removeAll in interface Collection<BArgument>
        Overrides:
        removeAll in class net.sf.tweety.commons.BeliefSet<BArgument,​net.sf.tweety.arg.dung.syntax.DungSignature>
      • prettyPrint

        public String prettyPrint()
        Pretty print of the framework.
        Returns:
        the pretty print of the framework.
      • instantiateSignature

        protected net.sf.tweety.arg.dung.syntax.DungSignature instantiateSignature()
        Specified by:
        instantiateSignature in class net.sf.tweety.commons.BeliefSet<BArgument,​net.sf.tweety.arg.dung.syntax.DungSignature>
      • getMinimalSignature

        public net.sf.tweety.commons.Signature getMinimalSignature()
        Specified by:
        getMinimalSignature in interface net.sf.tweety.commons.BeliefBase
      • add

        public boolean add​(net.sf.tweety.graphs.Edge<BArgument> edge)
        Specified by:
        add in interface net.sf.tweety.graphs.Graph<BArgument>
      • getNumberOfNodes

        public int getNumberOfNodes()
        Specified by:
        getNumberOfNodes in interface net.sf.tweety.graphs.Graph<BArgument>
      • areAdjacent

        public boolean areAdjacent​(BArgument a,
                                   BArgument b)
        Specified by:
        areAdjacent in interface net.sf.tweety.graphs.Graph<BArgument>
      • getEdges

        public Collection<? extends net.sf.tweety.graphs.Edge<? extends BArgument>> getEdges()
        Specified by:
        getEdges in interface net.sf.tweety.graphs.Graph<BArgument>
      • getChildren

        public Collection<BArgument> getChildren​(net.sf.tweety.graphs.Node node)
        Specified by:
        getChildren in interface net.sf.tweety.graphs.Graph<BArgument>
      • getParents

        public Collection<BArgument> getParents​(net.sf.tweety.graphs.Node node)
        Specified by:
        getParents in interface net.sf.tweety.graphs.Graph<BArgument>
      • existsDirectedPath

        public boolean existsDirectedPath​(BArgument node1,
                                          BArgument node2)
        Specified by:
        existsDirectedPath in interface net.sf.tweety.graphs.Graph<BArgument>
      • getAdjacencyMatrix

        public net.sf.tweety.math.matrix.Matrix getAdjacencyMatrix()
        Specified by:
        getAdjacencyMatrix in interface net.sf.tweety.graphs.Graph<BArgument>
      • getComplementGraph

        public net.sf.tweety.graphs.Graph<BArgument> getComplementGraph​(int i)
        Specified by:
        getComplementGraph in interface net.sf.tweety.graphs.Graph<BArgument>
      • getStronglyConnectedComponents

        public Collection<Collection<BArgument>> getStronglyConnectedComponents()
        Specified by:
        getStronglyConnectedComponents in interface net.sf.tweety.graphs.Graph<BArgument>
      • getSubgraphs

        public Collection<net.sf.tweety.graphs.Graph<BArgument>> getSubgraphs()
        Specified by:
        getSubgraphs in interface net.sf.tweety.graphs.Graph<BArgument>
      • getRestriction

        public net.sf.tweety.graphs.Graph<BArgument> getRestriction​(Collection<BArgument> collection)
        Specified by:
        getRestriction in interface net.sf.tweety.graphs.Graph<BArgument>
      • hasSelfLoops

        public boolean hasSelfLoops()
        Specified by:
        hasSelfLoops in interface net.sf.tweety.graphs.Graph<BArgument>
      • isWeightedGraph

        public boolean isWeightedGraph()
        Specified by:
        isWeightedGraph in interface net.sf.tweety.graphs.Graph<BArgument>