Package org.tweetyproject.commons
Class BeliefSetSampler<T extends Formula,U extends BeliefSet<T,?>>
java.lang.Object
org.tweetyproject.commons.BeliefSetSampler<T,U>
- Type Parameters:
T
- The type of formulas belief sets are made ofU
- The type of belief sets sampled
- All Implemented Interfaces:
Iterator<U>
,BeliefSetIterator<T,
U>
- Direct Known Subclasses:
CnfSampler
,ContensionSampler
,HsSampler
,MiSampler
,RandomSampler
,RandomSatSampler
,SimpleSafSampler
,SyntacticRandomSampler
public abstract class BeliefSetSampler<T extends Formula,U extends BeliefSet<T,?>>
extends Object
implements BeliefSetIterator<T,U>
This abstract class models a random sampler for belief sets. It comprises
of a set of sample methods which generates some random belief sets
wrt. to a given signature.
- Author:
- Matthias Thimm
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
This constant specifies the default maximum length for sampled belief bases.static final int
This constant specifies the default minimum length for sampled belief bases. -
Constructor Summary
ConstructorDescriptionBeliefSetSampler
(Signature signature) Creates a new belief base sampler for the given signature.BeliefSetSampler
(Signature signature, int minLength, int maxLength) Creates a new belief base sampler for the given signature. -
Method Summary
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
-
Field Details
-
DEFAULT_MAXIMUM_BELIEFBASE_LENGTH
public static final int DEFAULT_MAXIMUM_BELIEFBASE_LENGTHThis constant specifies the default maximum length for sampled belief bases. The interpretation of this int depends on the actual type of knowledge representation but should resemble the maximum number of formulas in the belief base;- See Also:
-
DEFAULT_MINIMUM_BELIEFBASE_LENGTH
public static final int DEFAULT_MINIMUM_BELIEFBASE_LENGTHThis constant specifies the default minimum length for sampled belief bases. The interpretation of this int depends on the actual type of knowledge representation but should resemble the minimum number of formulas in the belief base;- See Also:
-
-
Constructor Details
-
BeliefSetSampler
Creates a new belief base sampler for the given signature.- Parameters:
signature
- a signature.
-
BeliefSetSampler
Creates a new belief base sampler for the given signature.- Parameters:
signature
- a signature.minLength
- the minimum length of knowledge basesmaxLength
- the maximum length of knowledge bases
-
-
Method Details
-
hasNext
-
next
-
getSamplerSignature
Returns the signature of this sampler.- Returns:
- the signature of this sampler.
-
getMinLength
public int getMinLength()Returns the min length of kbs of this sampler.- Returns:
- the min length of kbs of this sampler.
-
getMaxLength
public int getMaxLength()Returns the max length of kbs of this sampler.- Returns:
- the max length of kbs of this sampler.
-