Class CafTheoryGenerator

java.lang.Object
org.tweetyproject.arg.caf.util.CafTheoryGenerator

public class CafTheoryGenerator extends Object
The CafTheoryGenerator class is responsible for generating ConstrainedArgumentationFramework (CAFs) based on a given DungTheory. The class can generate one or multiple CAFs with random constraints in CNF (Conjunctive Normal Form). This generator can either use a custom DungTheoryGenerator or instantiate a default one.
Author:
Sandra Hoffmann
  • Constructor Details

  • Method Details

    • hasNext

      public boolean hasNext()
      Checks whether there is a next element.
      Returns:
      whether there is a next element
    • next

      Generates a new CAF using a randomly generated constraint.
      Returns:
      the next CAF with a random constraint.
    • next

      public ArrayList<ConstrainedArgumentationFramework> next(int numCAFs)
      Generates numCAFs CAFs, each with a different randomly generated constraint. Each CAF is based on the same (randomly generated) DungTheory.
      Parameters:
      numCAFs - the number of constraints and CAFs to generate.
      Returns:
      a list of CAFs with random constraints.
    • next

      public ArrayList<ConstrainedArgumentationFramework> next(DungTheory theory, int numCAFs)
      Generates numCAFs CAFs, each with a different randomly generated constraint. Each CAF is based on the same given DungTheory.
      Parameters:
      theory - the Dung theory for which the CAFs are generated.
      numCAFs - the number of constraints and CAFs to generate.
      Returns:
      a list of CAFs with random constraints based on the given theory.
    • setSeed

      public void setSeed(long seed)
      Set the seed for the generation. Every two runs of generations with the same seed are ensured to be identical.
      Parameters:
      seed - some seed.