Class PossibleWorldIterator
- java.lang.Object
-
- net.sf.tweety.logics.pl.semantics.PossibleWorldIterator
-
- All Implemented Interfaces:
java.util.Iterator<PossibleWorld>
,InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
public class PossibleWorldIterator extends java.lang.Object implements InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
Iterates effectively over all interpretation sets worlds of a given signature.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description PossibleWorldIterator()
Creates new iterator.PossibleWorldIterator(PlSignature sig)
Creates new iterator for the given signature.
-
Method Summary
Modifier and Type Method Description boolean
hasNext()
PossibleWorld
next()
void
remove()
InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
reset()
Initializes a new reseted iterator.InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
reset(java.util.Collection<? extends Formula> formulas)
Initializes a new reseted iterator for the given signature derived from the given set of formulas.InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
reset(Signature sig)
Initializes a new reseted iterator for the given signature.
-
-
-
Constructor Detail
-
PossibleWorldIterator
public PossibleWorldIterator()
Creates new iterator.
-
PossibleWorldIterator
public PossibleWorldIterator(PlSignature sig)
Creates new iterator for the given signature.- Parameters:
sig
- some signature
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Specified by:
hasNext
in interfacejava.util.Iterator<PossibleWorld>
-
next
public PossibleWorld next()
- Specified by:
next
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Specified by:
next
in interfacejava.util.Iterator<PossibleWorld>
-
remove
public void remove()
- Specified by:
remove
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Specified by:
remove
in interfacejava.util.Iterator<PossibleWorld>
-
reset
public InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld> reset()
Description copied from interface:InterpretationIterator
Initializes a new reseted iterator.- Specified by:
reset
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Returns:
- a reseted iterator.
-
reset
public InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld> reset(Signature sig)
Description copied from interface:InterpretationIterator
Initializes a new reseted iterator for the given signature.- Specified by:
reset
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Parameters:
sig
- some signature.- Returns:
- a reseted iterator for the given signature.
-
reset
public InterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld> reset(java.util.Collection<? extends Formula> formulas)
Description copied from interface:InterpretationIterator
Initializes a new reseted iterator for the given signature derived from the given set of formulas.- Specified by:
reset
in interfaceInterpretationIterator<PlFormula,PlBeliefSet,PossibleWorld>
- Parameters:
formulas
- a set of formulas.- Returns:
- a reseted iterator for the given signature derived from the given set of formulas.
-
-