Package org.tweetyproject.logics.pl.util
Class CnfSampler
java.lang.Object
org.tweetyproject.commons.BeliefSetSampler<PlFormula,PlBeliefSet>
org.tweetyproject.logics.pl.util.CnfSampler
- All Implemented Interfaces:
Iterator<PlBeliefSet>
,BeliefSetIterator<PlFormula,
PlBeliefSet>
A simple sampler for propositional belief bases. This sampler
always generates belief bases in CNF, i.e. every formula
appearing in the belief base is a disjunction of literals.
- Author:
- Matthias Thimm
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSetSampler
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
-
Constructor Summary
ConstructorDescriptionCnfSampler
(Signature signature, double maxVariableRatio) Creates a new sampler for the given signature.CnfSampler
(Signature signature, double maxVariableRatio, 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
-
CnfSampler
Creates a new sampler for the given signature.- Parameters:
signature
- a signaturemaxVariableRatio
- the maximum ratio (a value between 0 and 1) of variables of the signature appearing in some formula.
-
CnfSampler
Creates a new sampler for the given signature.- Parameters:
signature
- a signaturemaxVariableRatio
- the maximum ratio (a value between 0 and 1) of variables of the signature appearing in some formula.minLength
- 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>
-
sampleFormula
-