Package net.sf.tweety.logics.pl.util
Class EnumeratingIterator
- java.lang.Object
-
- net.sf.tweety.logics.pl.util.EnumeratingIterator
-
- All Implemented Interfaces:
Iterator<PlBeliefSet>,net.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>
public class EnumeratingIterator extends Object implements net.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>
This sampler enumerates all possible propositional belief bases of the given signature. It does so by taking all subsets of the set of interpretations as the models of some formula and combines all these formulas in all ways.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description EnumeratingIterator(PlSignature signature)Creates a new sampler for the given signature
-
Method Summary
Modifier and Type Method Description booleanhasNext()PlBeliefSetnext()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
EnumeratingIterator
public EnumeratingIterator(PlSignature signature)
Creates a new sampler for the given signature- Parameters:
signature- some signature
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacenet.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
hasNextin interfaceIterator<PlBeliefSet>
-
next
public PlBeliefSet next()
- Specified by:
nextin interfacenet.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
nextin interfaceIterator<PlBeliefSet>
-
-