Class EnumeratingIterator

  • All Implemented Interfaces:
    java.util.Iterator<PlBeliefSet>, BeliefSetIterator<PlFormula,​PlBeliefSet>

    public class EnumeratingIterator
    extends java.lang.Object
    implements 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<PossibleWorld> allWorlds
      All possible worlds
      private int currentLength
      The current length
      private java.util.BitSet indices
      The current indices of the worlds that construct the formulas.
      private PlSignature signature
      The used signature.
    • Method Summary

      Modifier and Type Method Description
      boolean hasNext()  
      private java.util.BitSet increment​(java.util.BitSet bitSet)
      Increments the given bit set, returns null if an overflow happens.
      PlBeliefSet next()  
      • 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
    • Field Detail

      • currentLength

        private int currentLength
        The current length
      • allWorlds

        private java.util.List<PossibleWorld> allWorlds
        All possible worlds
      • indices

        private java.util.BitSet indices
        The current indices of the worlds that construct the formulas.
      • signature

        private PlSignature signature
        The used signature.
    • Constructor Detail

      • EnumeratingIterator

        public EnumeratingIterator​(PlSignature signature)
        Creates a new sampler for the given signature
        Parameters:
        signature - some signature