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:
Iterator<PlBeliefSet>
,BeliefSetIterator<PlFormula,
PlBeliefSet>
This sampler generates random belief sets by selecting,
for each formula a random set of possible worlds as its models.
- Author:
- Matthias Thimm
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSetSampler
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
-
Constructor Summary
ConstructorDescriptionRandomSampler
(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
Methods inherited from class org.tweetyproject.commons.BeliefSetSampler
getMaxLength, getMinLength, getSamplerSignature, hasNext
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
RandomSampler
Creates a new sampler for the given signature- Parameters:
signature
- some signatureworldProb
- Probability of selecting any world as a model of a formula
-
RandomSampler
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 Details
-
next
- Specified by:
next
in interfaceBeliefSetIterator<PlFormula,
PlBeliefSet> - Specified by:
next
in interfaceIterator<PlBeliefSet>
- Specified by:
next
in classBeliefSetSampler<PlFormula,
PlBeliefSet>
-