Class Independence
java.lang.Object
org.tweetyproject.arg.dung.independence.Independence
This class implements the concepts of conditional independence for sets of arguments in abstract argumentation frameworks
- Author:
- Lars Bengel
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleGraph
<Argument> computeDGraph
(DungTheory theory) Transform the given AF into a DAG (D-graph) by adding new meta argument for each strongly connected componentstatic boolean
isIndependent
(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC) Compute whether argsA and argsB are independent given argsC in the given AF argsA, argsB and argsC are disjointstatic boolean
isIndependent
(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC, boolean pruneOutAttacks) Compute whether argsA and argsB are independent given argsC in the given AF argsA, argsB and argsC are disjointstatic Collection
<Collection<Argument>> isIndependentGiven
(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB) Compute the smallest set of arguments which needs to be observed so that argsA and argsB are independent in the given AF argsA and argsB are disjointstatic Collection
<Collection<Argument>> isIndependentGiven
(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, boolean pruneOutAttacks) Compute the smallest set of arguments which needs to be observed so that argsA and argsB are independent in the given AF argsA and argsB are disjointstatic SimpleGraph
<Argument> pruneDGraph
(SimpleGraph<Argument> dGraph, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC) Prune the given DAG by removing all leaf nodes, which are not in any of the given sets and removing all outgoing edges from nodes in argsC
-
Constructor Details
-
Independence
public Independence()
-
-
Method Details
-
isIndependent
public static boolean isIndependent(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC, boolean pruneOutAttacks) Compute whether argsA and argsB are independent given argsC in the given AF argsA, argsB and argsC are disjoint- Parameters:
theory
- a dung theoryargsA
- a set of argumentsargsB
- a set of argumentsargsC
- a set of argumentspruneOutAttacks
- a flag indicating if attacks from arguments that are always out should be pruned- Returns:
- true iff argsA and argsB are independent given argsC in theory
-
isIndependent
public static boolean isIndependent(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC) Compute whether argsA and argsB are independent given argsC in the given AF argsA, argsB and argsC are disjoint- Parameters:
theory
- a dung theoryargsA
- a set of argumentsargsB
- a set of argumentsargsC
- a set of arguments- Returns:
- true iff argsA and argsB are independent given argsC in theory
-
isIndependentGiven
public static Collection<Collection<Argument>> isIndependentGiven(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB, boolean pruneOutAttacks) Compute the smallest set of arguments which needs to be observed so that argsA and argsB are independent in the given AF argsA and argsB are disjoint- Parameters:
theory
- a dung theoryargsA
- a set of argumentsargsB
- a set of argumentspruneOutAttacks
- a flag indicating if attacks from arguments that are always out should be pruned- Returns:
- the smallest set of arguments which we need to observe so that argsA and argsB are independent
-
isIndependentGiven
public static Collection<Collection<Argument>> isIndependentGiven(DungTheory theory, Collection<Argument> argsA, Collection<Argument> argsB) Compute the smallest set of arguments which needs to be observed so that argsA and argsB are independent in the given AF argsA and argsB are disjoint- Parameters:
theory
- a dung theoryargsA
- a set of argumentsargsB
- a set of arguments- Returns:
- the smallest set of arguments which we need to observe so that argsA and argsB are independent
-
computeDGraph
Transform the given AF into a DAG (D-graph) by adding new meta argument for each strongly connected component- Parameters:
theory
- a dung theory- Returns:
- the d-graph of the given AF
-
pruneDGraph
public static SimpleGraph<Argument> pruneDGraph(SimpleGraph<Argument> dGraph, Collection<Argument> argsA, Collection<Argument> argsB, Collection<Argument> argsC) Prune the given DAG by removing all leaf nodes, which are not in any of the given sets and removing all outgoing edges from nodes in argsC- Parameters:
dGraph
- a DAGargsA
- a set of argumentsargsB
- a set of argumentsargsC
- a set of arguments- Returns:
- the pruned DAG
-