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:
java.util.Iterator<PlBeliefSet>
,BeliefSetIterator<PlFormula,PlBeliefSet>
public class RandomSampler extends BeliefSetSampler<PlFormula,PlBeliefSet>
- Author:
- mthimm
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.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 PlBeliefSet
next()
-
Methods inherited from class net.sf.tweety.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:
next
in interfaceBeliefSetIterator<PlFormula,PlBeliefSet>
- Specified by:
next
in interfacejava.util.Iterator<PlBeliefSet>
- Specified by:
next
in classBeliefSetSampler<PlFormula,PlBeliefSet>
-
-