Class CnfSampler

  • All Implemented Interfaces:
    Iterator<PlBeliefSet>, net.sf.tweety.commons.BeliefSetIterator<PlFormula,​PlBeliefSet>

    public class CnfSampler
    extends net.sf.tweety.commons.BeliefSetSampler<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 net.sf.tweety.commons.BeliefSetSampler

        DEFAULT_MAXIMUM_BELIEFBASE_LENGTH, DEFAULT_MINIMUM_BELIEFBASE_LENGTH
    • Constructor Summary

      Constructors 
      Constructor Description
      CnfSampler​(net.sf.tweety.commons.Signature signature, double maxVariableRatio)
      Creates a new sampler for the given signature.
      CnfSampler​(net.sf.tweety.commons.Signature signature, double maxVariableRatio, int minLength, int maxLength)
      Creates a new sampler for the given signature.
    • Constructor Detail

      • CnfSampler

        public CnfSampler​(net.sf.tweety.commons.Signature signature,
                          double maxVariableRatio)
        Creates a new sampler for the given signature.
        Parameters:
        signature - a signature
        maxVariableRatio - the maximum ratio (a value between 0 and 1) of variables of the signature appearing in some formula.
      • CnfSampler

        public CnfSampler​(net.sf.tweety.commons.Signature signature,
                          double maxVariableRatio,
                          int minLength,
                          int maxLength)
        Creates a new sampler for the given signature.
        Parameters:
        signature - a signature
        maxVariableRatio - the maximum ratio (a value between 0 and 1) of variables of the signature appearing in some formula.
        minLength - the minimum length of knowledge bases
        maxLength - the maximum length of knowledge bases