public class CnfSampler extends BeliefSetSampler<PropositionalFormula,PlBeliefSet>
| Modifier and Type | Field and Description |
|---|---|
private double |
maxVariableRatio
The maximum ratio of variables appearing in a single formula.
|
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH| Constructor and Description |
|---|
CnfSampler(Signature signature,
double maxVariableRatio)
Creates a new sampler for the given signature.
|
CnfSampler(Signature signature,
double maxVariableRatio,
int minLength,
int maxLength)
Creates a new sampler for the given signature.
|
| Modifier and Type | Method and Description |
|---|---|
PlBeliefSet |
next() |
PropositionalFormula |
sampleFormula()
Returns a random formula
|
getMaxLength, getMinLength, getSignature, hasNextprivate double maxVariableRatio
public CnfSampler(Signature signature, double maxVariableRatio)
signature - maxVariableRatio - the maximum ratio (a value between 0 and 1) of variables
of the signature appearing in some formula.public CnfSampler(Signature signature, double maxVariableRatio, int minLength, int maxLength)
signature - maxVariableRatio - the maximum ratio (a value between 0 and 1) of variables
of the signature appearing in some formula.minLength - 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 PropositionalFormula sampleFormula()