Package net.sf.tweety.arg.adf.syntax
Class AbstractDialecticalFramework
- java.lang.Object
-
- net.sf.tweety.arg.adf.syntax.AbstractDialecticalFramework
-
- All Implemented Interfaces:
Comparable<AbstractDialecticalFramework>,Iterable<Argument>,net.sf.tweety.commons.BeliefBase
public class AbstractDialecticalFramework extends Object implements net.sf.tweety.commons.BeliefBase, Comparable<AbstractDialecticalFramework>, Iterable<Argument>
This class implements abstract dialectical frameworks, cf. [Brewka, Ellmauthaler, Strass, Wallner, Woltran. Abstract Dialectical Frameworks Revisited. IJCAI'13]- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description AbstractDialecticalFramework(Map<Argument,AcceptanceCondition> accByArgument)
-
Method Summary
Modifier and Type Method Description Stream<Argument>arguments()booleanbipolar()Checks if the ADF is bipolar.intcompareTo(AbstractDialecticalFramework o)booleancontainsArgument(Argument a)AcceptanceConditiongetAcceptanceCondition(Argument argument)net.sf.tweety.commons.SignaturegetMinimalSignature()Iterator<Argument>iterator()longkBipolar()Linklink(Argument a, Argument b)Computes the link (a,b) iff necessary and returns it afterwards.Stream<Link>links()Stream<Link>linksFromParents(Argument b)Stream<Link>linksToChildren(Argument a)AbstractDialecticalFrameworkomegaReduct(Interpretation interpretation)Computes a reduct of this ADF relative to the given interpretation s.t.Stream<Argument>parents(Argument child)voidsetLinkStrategy(LinkStrategy linkStrategy)AbstractDialecticalFrameworktransform(Transform<AcceptanceCondition,AcceptanceCondition> transform)Creates a copy of this ADF with transformed acceptance conditions.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
AbstractDialecticalFramework
public AbstractDialecticalFramework(Map<Argument,AcceptanceCondition> accByArgument)
-
-
Method Detail
-
bipolar
public boolean bipolar()
Checks if the ADF is bipolar. May compute all links to do so.- Returns:
- true iff all of the links are bipolar
-
kBipolar
public long kBipolar()
-
getAcceptanceCondition
public AcceptanceCondition getAcceptanceCondition(Argument argument)
-
containsArgument
public boolean containsArgument(Argument a)
-
omegaReduct
public AbstractDialecticalFramework omegaReduct(Interpretation interpretation)
Computes a reduct of this ADF relative to the given interpretation s.t. all unsatisfied arguments are replaced with false.- Parameters:
interpretation-- Returns:
- the reduct
-
transform
public AbstractDialecticalFramework transform(Transform<AcceptanceCondition,AcceptanceCondition> transform)
Creates a copy of this ADF with transformed acceptance conditions.- Parameters:
transform- the transform to apply- Returns:
- a copy of this ADF
-
linksFromParents
public Stream<Link> linksFromParents(Argument b)
- Parameters:
b-- Returns:
- a stream of links (a,b)
-
linksToChildren
public Stream<Link> linksToChildren(Argument a)
- Parameters:
a-- Returns:
- a stream of links (a,b)
-
link
public Link link(Argument a, Argument b)
Computes the link (a,b) iff necessary and returns it afterwards.- Parameters:
a-b-- Returns:
- (a,b)
-
setLinkStrategy
public void setLinkStrategy(LinkStrategy linkStrategy)
- Parameters:
linkStrategy- the strategy which is used for computing the links
-
compareTo
public int compareTo(AbstractDialecticalFramework o)
- Specified by:
compareToin interfaceComparable<AbstractDialecticalFramework>
-
getMinimalSignature
public net.sf.tweety.commons.Signature getMinimalSignature()
- Specified by:
getMinimalSignaturein interfacenet.sf.tweety.commons.BeliefBase
-
-