public class CnfSampler extends BeliefBaseSampler<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.
|
Modifier and Type | Method and Description |
---|---|
PropositionalFormula |
randomFormula()
Samples a random formula (a disjunction of literals).
|
PlBeliefSet |
randomSample(int minLength,
int maxLength)
This method randomly samples a single belief base of the given signature
with the given belief base length.
|
getSignature, randomSample, randomSample
private 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 PlBeliefSet randomSample(int minLength, int maxLength)
BeliefBaseSampler
randomSample
in class BeliefBaseSampler<PlBeliefSet>
minLength
- the minimum length of the belief base.maxLength
- the maximum length of the belief base.public PropositionalFormula randomFormula()