Package net.sf.tweety.logics.pl.util
Class CanonicalIterator
- java.lang.Object
-
- net.sf.tweety.logics.pl.util.CanonicalIterator
-
- All Implemented Interfaces:
Iterator<PlBeliefSet>,net.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>
public class CanonicalIterator extends Object implements net.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>
Provides an iterator on all syntactically equivalent knowledge bases.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description CanonicalIterator()Default 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
Modifier and Type Method Description static BitSetbeliefSet2BitSet(PlBeliefSet bs)Creates a bitset representation of the given belief set.booleanhasNext()PlBeliefSetnext()BigIntegernextIndex()Returns the index of the next element.-
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
-
CanonicalIterator
public CanonicalIterator()
Default constructor. Creates an enumerator that enumerates knowledge bases starting from index 1.
-
CanonicalIterator
public CanonicalIterator(Long startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex- some integer value
-
CanonicalIterator
public CanonicalIterator(Integer startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex- some integer value
-
CanonicalIterator
public CanonicalIterator(BigInteger startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex- some integer value
-
CanonicalIterator
public CanonicalIterator(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)- Parameters:
startIndex- some integer valueendIndex- some integer value
-
CanonicalIterator
public CanonicalIterator(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)- Parameters:
startIndex- some integer valueendIndex- some integer value
-
CanonicalIterator
public CanonicalIterator(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)- Parameters:
startIndex- some integer valueendIndex- some integer value
-
-
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>
-
nextIndex
public BigInteger nextIndex()
Returns the index of the next element.- Returns:
- the index of the next element.
-
beliefSet2BitSet
public static BitSet beliefSet2BitSet(PlBeliefSet bs)
Creates a bitset representation of the given belief set.- Parameters:
bs- some belief set- Returns:
- a bitset representation of the belief set
-
-