public class RandomPlBeliefSetSampler extends BeliefBaseSampler<PlBeliefSet>
Modifier and Type | Field and Description |
---|---|
private java.util.List<PossibleWorld> |
allWorlds
All possible worlds
|
private java.util.Random |
rand
for generating random numbers
|
private double |
worldProb
Probability of selecting any world as a model of a formula
|
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
Constructor and Description |
---|
RandomPlBeliefSetSampler(Signature signature,
double worldProb)
Creates a new sampler for the given signature
|
Modifier and Type | Method and Description |
---|---|
private PropositionalFormula |
randomFormula()
Returns a random formula.
|
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 java.util.List<PossibleWorld> allWorlds
private java.util.Random rand
private double worldProb
public RandomPlBeliefSetSampler(Signature signature, double worldProb)
signature
- some signatureworldProb
- Probability of selecting any world as a model of a formulapublic 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.private PropositionalFormula randomFormula()