Class CafTheoryGenerator
java.lang.Object
org.tweetyproject.arg.caf.util.CafTheoryGenerator
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 SummaryConstructorsConstructorDescriptionDefault constructor.CafTheoryGenerator(DungTheoryGenerator generator) Constructor with a customDungTheoryGenerator.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanhasNext()Checks whether there is a next element.next()Generates a new CAF using a randomly generated constraint.next(int numCAFs) Generates numCAFs CAFs, each with a different randomly generated constraint.next(DungTheory theory, int numCAFs) Generates numCAFs CAFs, each with a different randomly generated constraint.voidsetSeed(long seed) Set the seed for the generation.
- 
Constructor Details- 
CafTheoryGeneratorpublic CafTheoryGenerator()Default constructor. Instantiates a defaultDungTheoryGeneratorusing the defaultDungTheoryGenerationParameters.
- 
CafTheoryGeneratorConstructor with a customDungTheoryGenerator.- Parameters:
- generator- the custom- DungTheoryGeneratorto use for generating Dung theories.
 
 
- 
- 
Method Details- 
hasNextpublic boolean hasNext()Checks whether there is a next element.- Returns:
- whether there is a next element
 
- 
nextGenerates a new CAF using a randomly generated constraint.- Returns:
- the next CAF with a random constraint.
 
- 
nextGenerates 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.
 
- 
nextGenerates 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.
 
- 
setSeedpublic 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.
 
 
-