public class EnumeratingDungTheoryGenerator extends java.lang.Object implements DungTheoryGenerator
Modifier and Type | Field and Description |
---|---|
private java.util.Set<Argument> |
arguments
The current set of arguments.
|
private java.util.BitSet |
attacks
used to enumerate all possible attack combinations.
|
private int |
currentSize
The size of the currently generated theories.
|
private java.util.List<Attack> |
possibleAttacks
The set of possible attacks.
|
Constructor and Description |
---|
EnumeratingDungTheoryGenerator()
Creates a new enumerating Dung theory generator.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
addOneToBitSet(java.util.BitSet b,
int length)
Adds "1" to the bitset.
|
private java.util.List<Attack> |
generatePossibleAttacks(java.util.Set<Argument> arguments)
Computes all possible attacks.
|
boolean |
hasNext() |
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.
|
private int currentSize
private java.util.BitSet attacks
private java.util.List<Attack> possibleAttacks
private java.util.Set<Argument> arguments
public EnumeratingDungTheoryGenerator()
private boolean addOneToBitSet(java.util.BitSet b, int length)
b
- a bitsetlength
- the length of the bitsetprivate java.util.List<Attack> generatePossibleAttacks(java.util.Set<Argument> arguments)
arguments
- some set of argumentspublic DungTheory next()
next
in interface java.util.Iterator<DungTheory>
next
in interface DungTheoryGenerator
next
in interface BeliefSetIterator<Argument,DungTheory>
public DungTheory next(Argument arg)
DungTheoryGenerator
next
in interface DungTheoryGenerator
arg
- an argument that is enforced
to be in the grounded extension of the generated theory.public void setSeed(long seed)
DungTheoryGenerator
setSeed
in interface DungTheoryGenerator
seed
- some seed.public boolean hasNext()
hasNext
in interface java.util.Iterator<DungTheory>
hasNext
in interface DungTheoryGenerator
hasNext
in interface BeliefSetIterator<Argument,DungTheory>