public class RandomSatSampler extends BeliefSetSampler<PropositionalFormula,PlBeliefSet>
Modifier and Type | Field and Description |
---|---|
private int |
k
The length of each clause
|
private java.util.Random |
rand
For randomisation
|
private SetTools<Proposition> |
setTools
For randomisation
|
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
Constructor and Description |
---|
RandomSatSampler(Signature signature,
int k)
Constructs a new sampler
|
RandomSatSampler(Signature signature,
int k,
int minLength,
int maxLength)
Constructs a new sampler
|
Modifier and Type | Method and Description |
---|---|
PlBeliefSet |
next() |
Disjunction |
randomClause()
Generates a random clause with k literals.
|
getMaxLength, getMinLength, getSignature, hasNext
private int k
private SetTools<Proposition> setTools
private java.util.Random rand
public RandomSatSampler(Signature signature, int k)
signature
- some signaturek
- the length of each clausepublic RandomSatSampler(Signature signature, int k, int minLength, int maxLength)
signature
- some signaturek
- the length of each clauseminLength
- the minimum length of knowledge basesmaxLength
- the maximum length of knowledge basespublic PlBeliefSet next()
next
in interface java.util.Iterator<PlBeliefSet>
next
in interface BeliefSetIterator<PropositionalFormula,PlBeliefSet>
next
in class BeliefSetSampler<PropositionalFormula,PlBeliefSet>
public Disjunction randomClause()