Class PostulateEvaluator<T extends Formula,​U extends BeliefSet<T,​?>>

  • Type Parameters:
    T - The type of formulas used in the evaluation.
    U - The type of belief bases used in the evaluation.

    public class PostulateEvaluator<T extends Formula,​U extends BeliefSet<T,​?>>
    extends java.lang.Object
    Evaluates some approach (reasoner, measure, etc.) wrt. a series of rationality postulates on a given series of knowledge bases.
    Author:
    Matthias Thimm
    • Constructor Detail

      • PostulateEvaluator

        public PostulateEvaluator​(BeliefSetIterator<T,​U> iterator,
                                  PostulateEvaluatable<T> ev,
                                  java.util.Collection<Postulate<T>> postulates)
        Creates a new evaluator for the given evaluatable and belief base generator.
        Parameters:
        iterator - some belief set iterator
        ev - some evaluatable
        postulates - a set of postulates
      • PostulateEvaluator

        public PostulateEvaluator​(BeliefSetIterator<T,​U> iterator,
                                  PostulateEvaluatable<T> ev)
        Creates a new evaluator for the given evaluatable and belief base generator.
        Parameters:
        iterator - some belief set iterator
        ev - some evaluatable
    • Method Detail

      • addPostulate

        public void addPostulate​(Postulate<T> p)
        Adds the given postulate
        Parameters:
        p - some postulate
      • addAllPostulates

        public void addAllPostulates​(java.util.Collection<? extends Postulate<T>> postulates)
        Adds all postulates in the given collection.
        Parameters:
        postulates -
      • removePostulate

        public boolean removePostulate​(Postulate<T> p)
        Removes the given postulate
        Parameters:
        p - some postulate
        Returns:
        true if this contained the specified postulate.
      • removeAllPostulates

        public void removeAllPostulates​(java.util.Collection<? extends Postulate<T>> postulates)
        Removes all postulates in the given collection.
        Parameters:
        postulates -
      • evaluate

        public PostulateEvaluationReport<T> evaluate​(long num,
                                                     boolean stopWhenFailed)
        Evaluates all postulates of this evaluator on the given approach on num belief bases generated by the sampler of this evaluator.
        Parameters:
        num - the number of belief bases to be applied.
        stopWhenFailed - if true the evaluation of one postulate will be stopped once a violation has been encountered.
        Returns:
        a report on the evaluation
      • evaluate

        public PostulateEvaluationReport<T> evaluate​(long num)
        Evaluates all postulates of this evaluator on the given approach on num belief bases generated by the sampler of this evaluator. The evaluation of any one postulate will be stopped once a violation has been encountered.
        Parameters:
        num - the number of belief bases to be applied.
        Returns:
        a report on the evaluation