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:
Comparable<Interpretation>,Iterable<Argument>,net.sf.tweety.commons.Interpretation<AbstractDialecticalFramework,Argument>
public class Interpretation extends net.sf.tweety.commons.AbstractInterpretation<AbstractDialecticalFramework,Argument> implements Comparable<Interpretation>, Iterable<Argument>
This class represents an immutable three-valued interpretation of an Abstract Dialectical Framework (ADF).- Author:
- Mathias Hofer
-
-
Constructor Summary
Constructors Constructor Description Interpretation(Iterable<Argument> undecided)Creates a new empty interpretation, hence where all arguments are undecided.Interpretation(Map<Argument,Boolean> assignments)Creates an interpretation based on the given mapping.
-
Method Summary
Modifier and Type Method Description Stream<Argument>arguments()intcompareTo(Interpretation that)booleancontains(Argument a)booleanequals(Object obj)Booleanget(Argument a)Set<Argument>getSatisfied()Set<Argument>getUndecided()Set<Argument>getUnsatisfied()inthashCode()booleanisSatisfied(Argument a)booleanisUndecided(Argument a)booleanisUnsatisfied(Argument a)Iterator<Argument>iterator()Stream<Argument>satisfied()booleansatisfies(AbstractDialecticalFramework beliefBase)booleansatisfies(Argument formula)intsize()StringtoString()Stream<Argument>undecided()Stream<Argument>unsatisfied()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
compareTo
public int compareTo(Interpretation that)
- Specified by:
compareToin interfaceComparable<Interpretation>
-
satisfies
public boolean satisfies(Argument formula) throws IllegalArgumentException
- Specified by:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<AbstractDialecticalFramework,Argument>- Throws:
IllegalArgumentException
-
satisfies
public boolean satisfies(AbstractDialecticalFramework beliefBase) throws IllegalArgumentException
- Specified by:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<AbstractDialecticalFramework,Argument>- Throws:
IllegalArgumentException
-
arguments
public Stream<Argument> arguments()
- Returns:
- an unmodifiable set of all the arguments labeled by this interpretation
-
getSatisfied
public Set<Argument> getSatisfied()
- Returns:
- an unmodifiable view of the satisfied arguments
-
getUnsatisfied
public Set<Argument> getUnsatisfied()
- Returns:
- an unmodifiable view of the unsatisfied arguments
-
getUndecided
public Set<Argument> getUndecided()
- Returns:
- an unmodifiable view of the undecided arguments
-
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 Boolean get(Argument a)
- Parameters:
a- the argument for which we want to know its value- Returns:
- true, false or null if this argument is labeled as satisfied, unsatisfied or undecided.
- Throws:
IllegalArgumentException- if the interpretation does not contain the given argument.
-
-