Package org.tweetyproject.logics.pl.util
Class CanonicalIterator
java.lang.Object
org.tweetyproject.logics.pl.util.CanonicalIterator
- All Implemented Interfaces:
Iterator<PlBeliefSet>
,BeliefSetIterator<PlFormula,
PlBeliefSet>
Provides an iterator on all syntactically equivalent knowledge bases.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionDefault constructor.CanonicalIterator
(Integer startIndex) Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator
(Integer startIndex, Integer endIndex) Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)CanonicalIterator
(Long startIndex) Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator
(Long startIndex, Long endIndex) Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)CanonicalIterator
(BigInteger startIndex) Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator
(BigInteger startIndex, BigInteger endIndex) Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including) -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
CanonicalIterator
public CanonicalIterator()Default constructor. Creates an enumerator that enumerates knowledge bases starting from index 1. -
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)- Parameters:
startIndex
- some integer valueendIndex
- some integer value
-
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)- Parameters:
startIndex
- some integer valueendIndex
- some integer value
-
CanonicalIterator
Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)- Parameters:
startIndex
- some integer valueendIndex
- some integer value
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceBeliefSetIterator<PlFormula,
PlBeliefSet> - Specified by:
hasNext
in interfaceIterator<PlBeliefSet>
-
next
- Specified by:
next
in interfaceBeliefSetIterator<PlFormula,
PlBeliefSet> - Specified by:
next
in interfaceIterator<PlBeliefSet>
-
nextIndex
Returns the index of the next element.- Returns:
- the index of the next element.
-
beliefSet2BitSet
Creates a bitset representation of the given belief set.- Parameters:
bs
- some belief set- Returns:
- a bitset representation of the belief set
-