Class PossibleWorld
- java.lang.Object
-
- net.sf.tweety.commons.AbstractInterpretation<B,S>
-
- net.sf.tweety.commons.InterpretationSet<Proposition,PlBeliefSet,PlFormula>
-
- net.sf.tweety.logics.pl.semantics.PossibleWorld
-
- All Implemented Interfaces:
Comparable<PossibleWorld>,Iterable<Proposition>,Collection<Proposition>,net.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula>
public class PossibleWorld extends net.sf.tweety.commons.InterpretationSet<Proposition,PlBeliefSet,PlFormula> implements Comparable<PossibleWorld>
This class represents a possible world of propositional logic, i.e. some set of propositions.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description PossibleWorld()Creates a new empty possible world.PossibleWorld(Collection<? extends Proposition> propositions)Creates a new possible world with the given set of propositions.
-
Method Summary
Modifier and Type Method Description intcompareTo(PossibleWorld arg0)static Set<PossibleWorld>getAllPossibleWorlds(Collection<Proposition> signature)Returns the set of all possible worlds for the given propositional signature.static Set<PossibleWorld>getAllPossibleWorlds(PlSignature signature)Returns the set of all possible worlds for the given propositional signature.PlFormulagetCompleteConjunction(PlSignature sig)Returns the complete conjunction representing this possible world wrt.booleansatisfies(Collection<PlFormula> formulas)booleansatisfies(PlBeliefSet beliefBase)booleansatisfies(PlFormula formula)-
Methods inherited from class net.sf.tweety.commons.InterpretationSet
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
PossibleWorld
public PossibleWorld()
Creates a new empty possible world.
-
PossibleWorld
public PossibleWorld(Collection<? extends Proposition> propositions)
Creates a new possible world with the given set of propositions.- Parameters:
propositions- the propositions that are true in this possible world
-
-
Method Detail
-
satisfies
public boolean satisfies(PlFormula formula) throws IllegalArgumentException
- Specified by:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula>- Throws:
IllegalArgumentException
-
satisfies
public boolean satisfies(Collection<PlFormula> formulas) throws IllegalArgumentException
- Specified by:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula>- Overrides:
satisfiesin classnet.sf.tweety.commons.AbstractInterpretation<PlBeliefSet,PlFormula>- Throws:
IllegalArgumentException
-
satisfies
public boolean satisfies(PlBeliefSet beliefBase) throws IllegalArgumentException
- Specified by:
satisfiesin interfacenet.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula>- Throws:
IllegalArgumentException
-
getAllPossibleWorlds
public static Set<PossibleWorld> getAllPossibleWorlds(Collection<Proposition> signature)
Returns the set of all possible worlds for the given propositional signature.- Parameters:
signature- a propositional signature.- Returns:
- the set of all possible worlds for the given propositional signature.
-
getAllPossibleWorlds
public static Set<PossibleWorld> getAllPossibleWorlds(PlSignature signature)
Returns the set of all possible worlds for the given propositional signature.- Parameters:
signature- a propositional signature.- Returns:
- the set of all possible worlds for the given propositional signature.
-
getCompleteConjunction
public PlFormula getCompleteConjunction(PlSignature sig)
Returns the complete conjunction representing this possible world wrt. the give signature- Parameters:
sig- a propositional signature- Returns:
- the complete conjunction representing this possible world wrt. the give signature
-
compareTo
public int compareTo(PossibleWorld arg0)
- Specified by:
compareToin interfaceComparable<PossibleWorld>
-
-