Package net.sf.tweety.arg.dung.util
Class FileDungTheoryGenerator
- java.lang.Object
-
- net.sf.tweety.arg.dung.util.FileDungTheoryGenerator
-
- All Implemented Interfaces:
java.util.Iterator<DungTheory>
,DungTheoryGenerator
,BeliefSetIterator<Argument,DungTheory>
public class FileDungTheoryGenerator extends java.lang.Object implements DungTheoryGenerator
This generator receives a list of files containing Dung theories and returns those step by step.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description FileDungTheoryGenerator(java.io.File[] files, Parser<DungTheory,?> parser, boolean loop)
Creates a new theory generator for the given files, which can be parsed by the given parser.
-
Method Summary
Modifier and Type Method Description boolean
hasNext()
DungTheory
next()
DungTheory
next(Argument arg)
Generates a new Dung theory where the given argument is enforced to be in the grounded extensionvoid
setSeed(long seed)
Set the seed for the generation.
-
-
-
Constructor Detail
-
FileDungTheoryGenerator
public FileDungTheoryGenerator(java.io.File[] files, Parser<DungTheory,?> parser, boolean loop)
Creates a new theory generator for the given files, which can be parsed by the given parser.- Parameters:
files
- an array of files.parser
- a parser for the files.loop
- whether to loop the files indefinitely.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceBeliefSetIterator<Argument,DungTheory>
- Specified by:
hasNext
in interfaceDungTheoryGenerator
- Specified by:
hasNext
in interfacejava.util.Iterator<DungTheory>
-
next
public DungTheory next()
- Specified by:
next
in interfaceBeliefSetIterator<Argument,DungTheory>
- Specified by:
next
in interfaceDungTheoryGenerator
- Specified by:
next
in interfacejava.util.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 interfaceDungTheoryGenerator
- 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 interfaceDungTheoryGenerator
- Parameters:
seed
- some seed.
-
-