public class SyntacticRandomPlBeliefSetSampler extends net.sf.tweety.commons.BeliefBaseSampler<PlBeliefSet>
This sampler implements a random generation algorithm for generating formulas, based on the syntax tree of propositional formulas. Consider the following BNF for a propositional logic formula:
F ::== !F | F && F | F || F | Awith propositions A. The algorithm for constructing formulas takes four parameters:
| Constructor and Description |
|---|
SyntacticRandomPlBeliefSetSampler(net.sf.tweety.commons.Signature signature,
net.sf.tweety.math.probability.Probability probneg,
net.sf.tweety.math.probability.Probability probconj,
net.sf.tweety.math.probability.Probability probdisj,
double recDecrease)
Creates a new sampler.
|
| Modifier and Type | Method and Description |
|---|---|
PlBeliefSet |
randomSample(int minLength,
int maxLength) |
PropositionalFormula |
sampleFormula(net.sf.tweety.math.probability.ProbabilityFunction<Byte> prob)
Samples a single formula.
|
public SyntacticRandomPlBeliefSetSampler(net.sf.tweety.commons.Signature signature,
net.sf.tweety.math.probability.Probability probneg,
net.sf.tweety.math.probability.Probability probconj,
net.sf.tweety.math.probability.Probability probdisj,
double recDecrease)
signature - some set of propositionsprobneg - the probability to generate a negationprobconj - the probability to generate a conjunctionprobdisj - the probability to generate a disjunctionrecDecrease - a value in (0,1) by which the above probabilities are multiplied in each recursive step to
increase likelihood of termination.public PropositionalFormula sampleFormula(net.sf.tweety.math.probability.ProbabilityFunction<Byte> prob)
public PlBeliefSet randomSample(int minLength, int maxLength)
randomSample in class net.sf.tweety.commons.BeliefBaseSampler<PlBeliefSet>Copyright © 2018. All rights reserved.