Package net.sf.tweety.logics.pl.util
Class CanonicalIterator
- java.lang.Object
-
- net.sf.tweety.logics.pl.util.CanonicalIterator
-
- All Implemented Interfaces:
java.util.Iterator<PlBeliefSet>
,BeliefSetIterator<PlFormula,PlBeliefSet>
public class CanonicalIterator extends java.lang.Object implements BeliefSetIterator<PlFormula,PlBeliefSet>
Provides an iterator on all syntactically equivalent knowledge bases.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description CanonicalIterator()
Default constructor.CanonicalIterator(java.lang.Integer startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator(java.lang.Integer startIndex, java.lang.Integer endIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)CanonicalIterator(java.lang.Long startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator(java.lang.Long startIndex, java.lang.Long endIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given start index up to the given end index (including)CanonicalIterator(java.math.BigInteger startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given indexCanonicalIterator(java.math.BigInteger startIndex, java.math.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 java.util.BitSet
beliefSet2BitSet(PlBeliefSet bs)
Creates a bitset representation of the given belief set.boolean
hasNext()
PlBeliefSet
next()
java.math.BigInteger
nextIndex()
Returns the index of the next element.
-
-
-
Constructor Detail
-
CanonicalIterator
public CanonicalIterator()
Default constructor. Creates an enumerator that enumerates knowledge bases starting from index 1.
-
CanonicalIterator
public CanonicalIterator(java.lang.Long startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
public CanonicalIterator(java.lang.Integer startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
public CanonicalIterator(java.math.BigInteger startIndex)
Creates a new enumerator that enumerates knowledge bases starting from the given index- Parameters:
startIndex
- some integer value
-
CanonicalIterator
public CanonicalIterator(java.lang.Long startIndex, java.lang.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(java.lang.Integer startIndex, java.lang.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(java.math.BigInteger startIndex, java.math.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:
hasNext
in interfaceBeliefSetIterator<PlFormula,PlBeliefSet>
- Specified by:
hasNext
in interfacejava.util.Iterator<PlBeliefSet>
-
next
public PlBeliefSet next()
- Specified by:
next
in interfaceBeliefSetIterator<PlFormula,PlBeliefSet>
- Specified by:
next
in interfacejava.util.Iterator<PlBeliefSet>
-
nextIndex
public java.math.BigInteger nextIndex()
Returns the index of the next element.- Returns:
- the index of the next element.
-
beliefSet2BitSet
public static java.util.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
-
-