Package net.sf.tweety.arg.adf.syntax
Class AbstractDialecticalFramework
- java.lang.Object
-
- net.sf.tweety.arg.adf.syntax.AbstractDialecticalFramework
-
- All Implemented Interfaces:
java.lang.Comparable<AbstractDialecticalFramework>
,java.lang.Iterable<Argument>
,BeliefBase
public class AbstractDialecticalFramework extends java.lang.Object implements BeliefBase, java.lang.Comparable<AbstractDialecticalFramework>, java.lang.Iterable<Argument>
This class implements abstract dialectical frameworks, cf. [Brewka, Ellmauthaler, Strass, Wallner, Woltran. Abstract Dialectical Frameworks Revisited. IJCAI'13]- Author:
- Mathias Hofer
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<Argument,AcceptanceCondition>
accByArgument
private java.util.Map<Argument,java.util.Set<Argument>>
childrenByParent
Maps an argument to all the arguments in which it occurs in their acceptance condition.private Cache<Pair<Argument,Argument>,Link>
linkCache
private LinkStrategy
linkStrategy
private java.util.Map<Argument,java.util.Set<Argument>>
parentsByChild
Maps an argument to the arguments of its acceptance condition
-
Constructor Summary
Constructors Constructor Description AbstractDialecticalFramework(java.util.Map<Argument,AcceptanceCondition> accByArgument)
-
Method Summary
Modifier and Type Method Description java.util.stream.Stream<Argument>
arguments()
boolean
bipolar()
Checks if the ADF is bipolar.int
compareTo(AbstractDialecticalFramework o)
AcceptanceCondition
getAcceptanceCondition(Argument argument)
Signature
getMinimalSignature()
Returns the signature of the language of this knowledge base.java.util.Iterator<Argument>
iterator()
Link
link(Argument a, Argument b)
Computes the link (a,b) iff necessary and returns it afterwards.java.util.stream.Stream<Link>
links()
java.util.stream.Stream<Link>
linksToChildren(Argument a)
TODO define functionalityjava.util.stream.Stream<Link>
linksToParent(Argument b)
TODO define functionalityjava.util.stream.Stream<Argument>
parents(Argument child)
void
setLink(Link link)
void
setLinkStrategy(LinkStrategy linkStrategy)
private void
updateRelations(Argument child)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.commons.BeliefBase
toString
-
-
-
-
Field Detail
-
linkStrategy
private LinkStrategy linkStrategy
-
parentsByChild
private java.util.Map<Argument,java.util.Set<Argument>> parentsByChild
Maps an argument to the arguments of its acceptance condition
-
childrenByParent
private java.util.Map<Argument,java.util.Set<Argument>> childrenByParent
Maps an argument to all the arguments in which it occurs in their acceptance condition.
-
accByArgument
private java.util.Map<Argument,AcceptanceCondition> accByArgument
-
-
Constructor Detail
-
AbstractDialecticalFramework
public AbstractDialecticalFramework(java.util.Map<Argument,AcceptanceCondition> accByArgument)
-
-
Method Detail
-
updateRelations
private void updateRelations(Argument child)
-
arguments
public java.util.stream.Stream<Argument> arguments()
-
bipolar
public boolean bipolar()
Checks if the ADF is bipolar. May compute all links to do so.- Returns:
- true iff this ADF is bipolar
-
getAcceptanceCondition
public AcceptanceCondition getAcceptanceCondition(Argument argument)
-
links
public java.util.stream.Stream<Link> links()
-
linksToParent
public java.util.stream.Stream<Link> linksToParent(Argument b)
TODO define functionality- Parameters:
b
- some argument- Returns:
- a stream of links (a,b)
-
linksToChildren
public java.util.stream.Stream<Link> linksToChildren(Argument a)
TODO define functionality- Parameters:
a
- some argument- 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
- some argumentb
- some argument- Returns:
- (a,b)
-
setLink
public void setLink(Link link)
-
setLinkStrategy
public void setLinkStrategy(LinkStrategy linkStrategy)
- Parameters:
linkStrategy
- the strategy which is used in order to compute the links whenever its necessary
-
compareTo
public int compareTo(AbstractDialecticalFramework o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<AbstractDialecticalFramework>
-
getMinimalSignature
public Signature getMinimalSignature()
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Specified by:
getMinimalSignature
in interfaceBeliefBase
- Returns:
- the signature of the language of this knowledge base.
-
-