Class EnumeratingDungTheoryGenerator

java.lang.Object
org.tweetyproject.arg.dung.util.EnumeratingDungTheoryGenerator
All Implemented Interfaces:
Iterator<DungTheory>, DungTheoryGenerator, BeliefSetIterator<Argument,DungTheory>
Direct Known Subclasses:
EnumeratingDilationGenerator

public class EnumeratingDungTheoryGenerator extends Object implements DungTheoryGenerator
This generator generators all possible Dung argumentation theories. It starts with the argumentation frameworks just consisting of one arguments and then increases their size.
Author:
Matthias Thimm
  • Constructor Details

    • EnumeratingDungTheoryGenerator

      public EnumeratingDungTheoryGenerator()
      Creates a new enumerating Dung theory generator.
  • Method Details

    • getAttacks

      public BitSet getAttacks()
      Returns:
      A BitSet representing the attack pattern in the last generated framework.
    • getCurrentSize

      public int getCurrentSize()
      Returns:
      Number of arguments of the last argumentation framework created by this generator, if the number was not newly set.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface BeliefSetIterator<Argument,DungTheory>
      Specified by:
      hasNext in interface DungTheoryGenerator
      Specified by:
      hasNext in interface Iterator<DungTheory>
    • next

      public DungTheory next()
      Specified by:
      next in interface BeliefSetIterator<Argument,DungTheory>
      Specified by:
      next in interface DungTheoryGenerator
      Specified by:
      next in interface Iterator<DungTheory>
    • 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,
    • setAttacks

      public boolean setAttacks(BitSet newAtks)
      Sets a new pattern of attacks from which the generator continues to generate new frameworks.
      Parameters:
      newAtks - BitSet representing a pattern of attacks in a argumentation framework.
      Returns:
      true iff the specified attack pattern was successfully set
    • setCurrentSize

      public boolean setCurrentSize(int newSize)
      Sets a new number of arguments for this generator and resets the generation process, so that the generator restarts going through all possible attacks
      Parameters:
      newSize - Number of arguments of the generator. Has to be > 0.
      Returns:
      true iff the number of arguments was successfully set
    • 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.