Class IsoSafeEnumeratingDungTheoryGenerator

  • All Implemented Interfaces:
    java.util.Iterator<DungTheory>, DungTheoryGenerator, BeliefSetIterator<Argument,​DungTheory>

    public class IsoSafeEnumeratingDungTheoryGenerator
    extends java.lang.Object
    implements DungTheoryGenerator
    This generator generators all possible Dung argumentation theories (modulo graph isomorphism). It starts with the argumentation frameworks just consisting of one arguments and then increases their size.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int cntArguments
      The number of arguments in the theory that is to be generated next.
      private int cntAttacks
      The number of attacks in the theory that is to be generated next.
      private java.util.Collection<DungTheory> currentTheories
      The set of all Dung theories with cntArguments arguments and cntAttacks attacks.
      private java.util.Iterator<DungTheory> iterator
      The iterator on currentTheories.
    • Method Summary

      Modifier and Type Method Description
      boolean hasNext()  
      private boolean isIsomorphic​(DungTheory theory, java.util.Collection<DungTheory> theories)
      Checks whether the first theory is isomorphic to some theory in "theories".
      DungTheory next()  
      DungTheory next​(Argument arg)
      Generates a new Dung theory where the given argument is enforced to be in the grounded extension
      void setSeed​(long seed)
      Set the seed for the generation.
      • 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

      • cntArguments

        private int cntArguments
        The number of arguments in the theory that is to be generated next.
      • cntAttacks

        private int cntAttacks
        The number of attacks in the theory that is to be generated next.
      • currentTheories

        private java.util.Collection<DungTheory> currentTheories
        The set of all Dung theories with cntArguments arguments and cntAttacks attacks.
      • iterator

        private java.util.Iterator<DungTheory> iterator
        The iterator on currentTheories.
    • Constructor Detail

      • IsoSafeEnumeratingDungTheoryGenerator

        public IsoSafeEnumeratingDungTheoryGenerator()
        Creates a new enumerating Dung theory generator.
    • Method Detail

      • isIsomorphic

        private boolean isIsomorphic​(DungTheory theory,
                                     java.util.Collection<DungTheory> theories)
        Checks whether the first theory is isomorphic to some theory in "theories".
        Parameters:
        theory - a Dung theory
        theories - a collection of Dung theories.
        Returns:
        "true" if the first theory is isomorphic to some theory in "theories".
      • next

        public DungTheory next​(Argument arg)
        Description copied from interface: DungTheoryGenerator
        Generates a new Dung theory where the given argument is enforced to be in the grounded extension
        Specified by:
        next in interface DungTheoryGenerator
        Parameters:
        arg - an argument that is enforced to be in the grounded extension of the generated theory.
        Returns:
        a Dung theory,
      • setSeed

        public void setSeed​(long seed)
        Description copied from interface: DungTheoryGenerator
        Set the seed for the generation. Every two runs of generations with the same seed are ensured to be identical.
        Specified by:
        setSeed in interface DungTheoryGenerator
        Parameters:
        seed - some seed.