Package net.sf.tweety.logics.pl.util
Class RandomSampler
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSetSampler<PlFormula,PlBeliefSet>
-
- net.sf.tweety.logics.pl.util.RandomSampler
-
- All Implemented Interfaces:
Iterator<PlBeliefSet>,net.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>
public class RandomSampler extends net.sf.tweety.commons.BeliefSetSampler<PlFormula,PlBeliefSet>
- Author:
- mthimm
-
-
Constructor Summary
Constructors Constructor Description RandomSampler(net.sf.tweety.commons.Signature signature, double worldProb)Creates a new sampler for the given signatureRandomSampler(net.sf.tweety.commons.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 net.sf.tweety.commons.BeliefSetSampler
getMaxLength, getMinLength, getSamplerSignature, hasNext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
RandomSampler
public RandomSampler(net.sf.tweety.commons.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(net.sf.tweety.commons.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 interfacenet.sf.tweety.commons.BeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
nextin interfaceIterator<PlBeliefSet>- Specified by:
nextin classnet.sf.tweety.commons.BeliefSetSampler<PlFormula,PlBeliefSet>
-
-