Package org.tweetyproject.logics.pl.util
Class RandomSampler
- java.lang.Object
-
- org.tweetyproject.commons.BeliefSetSampler<PlFormula,PlBeliefSet>
-
- org.tweetyproject.logics.pl.util.RandomSampler
-
- All Implemented Interfaces:
java.util.Iterator<PlBeliefSet>,BeliefSetIterator<PlFormula,PlBeliefSet>
public class RandomSampler extends BeliefSetSampler<PlFormula,PlBeliefSet>
- Author:
- mthimm
-
-
Field Summary
-
Fields inherited from class org.tweetyproject.commons.BeliefSetSampler
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
-
-
Constructor Summary
Constructors Constructor Description RandomSampler(Signature signature, double worldProb)Creates a new sampler for the given signatureRandomSampler(Signature signature, double worldProb, int minLength, int maxLength)Creates a new sampler for the given signature
-
Method Summary
Modifier and Type Method Description PlBeliefSetnext()-
Methods inherited from class org.tweetyproject.commons.BeliefSetSampler
getMaxLength, getMinLength, getSamplerSignature, hasNext
-
-
-
-
Constructor Detail
-
RandomSampler
public RandomSampler(Signature signature, double worldProb)
Creates a new sampler for the given signature- Parameters:
signature- some signatureworldProb- Probability of selecting any world as a model of a formula
-
RandomSampler
public RandomSampler(Signature signature, double worldProb, int minLength, int maxLength)
Creates a new sampler for the given signature- Parameters:
signature- some signatureworldProb- Probability of selecting any world as a model of a formulaminLength- the minimum length of knowledge basesmaxLength- the maximum length of knowledge bases
-
-
Method Detail
-
next
public PlBeliefSet next()
- Specified by:
nextin interfaceBeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
nextin interfacejava.util.Iterator<PlBeliefSet>- Specified by:
nextin classBeliefSetSampler<PlFormula,PlBeliefSet>
-
-