Package net.sf.tweety.arg.adf.semantics
Class Interpretation
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<AbstractDialecticalFramework,Argument>
-
- net.sf.tweety.arg.adf.semantics.Interpretation
-
- All Implemented Interfaces:
java.lang.Comparable<Interpretation>
,Interpretation<AbstractDialecticalFramework,Argument>
public class Interpretation extends AbstractInterpretation<AbstractDialecticalFramework,Argument> implements java.lang.Comparable<Interpretation>
This class represents an immutable three-valued interpretation of an Abstract Dialectical Framework (ADF).- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description Interpretation(java.lang.Iterable<Argument> undecided)
Interpretation(java.util.Collection<Argument> undecided)
Interpretation(java.util.Map<Argument,java.lang.Boolean> assignments)
-
Method Summary
Modifier and Type Method Description java.util.stream.Stream<Argument>
arguments()
int
compareTo(Interpretation that)
boolean
contains(Argument a)
boolean
equals(java.lang.Object obj)
java.lang.Boolean
get(Argument a)
TODO define functionalityjava.util.Set<Argument>
getSatisfied()
java.util.Set<Argument>
getUndecided()
java.util.Set<Argument>
getUnsatisfied()
int
hashCode()
boolean
isSatisfied(Argument a)
boolean
isUndecided(Argument a)
boolean
isUnsatisfied(Argument a)
java.util.stream.Stream<Argument>
satisfied()
boolean
satisfies(AbstractDialecticalFramework beliefBase)
Checks whether this interpretation satisfies the given knowledge base.boolean
satisfies(Argument formula)
Checks whether this interpretation satisfies the given formula.int
size()
java.lang.String
toString()
java.util.stream.Stream<Argument>
undecided()
java.util.stream.Stream<Argument>
unsatisfied()
-
Methods inherited from class net.sf.tweety.commons.AbstractInterpretation
satisfies
-
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(Interpretation that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Interpretation>
-
satisfies
public boolean satisfies(Argument formula) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given formula.- Specified by:
satisfies
in interfaceInterpretation<AbstractDialecticalFramework,Argument>
- Parameters:
formula
- a formula .- Returns:
- "true" if this interpretation satisfies the given formula.
- Throws:
java.lang.IllegalArgumentException
- if the formula does not correspond to the expected language.
-
satisfies
public boolean satisfies(AbstractDialecticalFramework beliefBase) throws java.lang.IllegalArgumentException
Description copied from interface:Interpretation
Checks whether this interpretation satisfies the given knowledge base.- Specified by:
satisfies
in interfaceInterpretation<AbstractDialecticalFramework,Argument>
- Parameters:
beliefBase
- a knowledge base.- Returns:
- "true" if this interpretation satisfies the given knowledge base.
- Throws:
java.lang.IllegalArgumentException
- IllegalArgumentException if the knowledgebase does not correspond to the expected language.
-
arguments
public java.util.stream.Stream<Argument> arguments()
- Returns:
- an unmodifiable set of all the arguments labeled by this interpretation
-
getSatisfied
public java.util.Set<Argument> getSatisfied()
- Returns:
- a copy of the set of satisfied arguments
-
satisfied
public java.util.stream.Stream<Argument> satisfied()
-
getUnsatisfied
public java.util.Set<Argument> getUnsatisfied()
- Returns:
- a copy of the set of unsatisfied arguments
-
unsatisfied
public java.util.stream.Stream<Argument> unsatisfied()
-
getUndecided
public java.util.Set<Argument> getUndecided()
- Returns:
- a copy of the set of undecided arguments
-
undecided
public java.util.stream.Stream<Argument> undecided()
-
size
public int size()
-
isSatisfied
public boolean isSatisfied(Argument a)
-
isUnsatisfied
public boolean isUnsatisfied(Argument a)
-
isUndecided
public boolean isUndecided(Argument a)
-
contains
public boolean contains(Argument a)
-
get
public java.lang.Boolean get(Argument a)
TODO define functionality- Parameters:
a
- some argument- Returns:
- true, false or null if this argument is labeled as satisfied, unsatisfied or undecided.
- Throws:
java.lang.IllegalArgumentException
- if the interpretation does not contain the given argument.
-
-