java.lang.Object
org.tweetyproject.commons.postulates.PostulateEvaluator<T,U>
- Type Parameters:
T
- The type of formulas used in the evaluation.U
- The type of belief bases used in the evaluation.
Evaluates some approach (reasoner, measure, etc.) wrt. a series
of rationality postulates on a given series of knowledge bases.
- Author:
- Matthias Thimm
-
Constructor Summary
ConstructorDescriptionPostulateEvaluator
(BeliefSetIterator<T, U> iterator, PostulateEvaluatable<T> ev) Creates a new evaluator for the given evaluatable and belief base generator.PostulateEvaluator
(BeliefSetIterator<T, U> iterator, PostulateEvaluatable<T> ev, Collection<Postulate<T>> postulates) Creates a new evaluator for the given evaluatable and belief base generator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllPostulates
(Collection<? extends Postulate<T>> postulates) Adds all postulates in the given collection.void
addPostulate
(Postulate<T> p) Adds the given postulateevaluate
(long num) Evaluates all postulates of this evaluator on the given approach onnum
belief bases generated by the sampler of this evaluator.evaluate
(long num, boolean stopWhenFailed) Evaluates all postulates of this evaluator on the given approach onnum
belief bases generated by the sampler of this evaluator.void
removeAllPostulates
(Collection<? extends Postulate<T>> postulates) Removes all postulates in the given collection.boolean
Removes the given postulate
-
Constructor Details
-
PostulateEvaluator
public PostulateEvaluator(BeliefSetIterator<T, U> iterator, PostulateEvaluatable<T> ev, Collection<Postulate<T>> postulates) Creates a new evaluator for the given evaluatable and belief base generator.- Parameters:
iterator
- some belief set iteratorev
- some evaluatablepostulates
- a set of postulates
-
PostulateEvaluator
Creates a new evaluator for the given evaluatable and belief base generator.- Parameters:
iterator
- some belief set iteratorev
- some evaluatable
-
-
Method Details
-
addPostulate
-
addAllPostulates
Adds all postulates in the given collection.- Parameters:
postulates
- some postulates
-
removePostulate
-
removeAllPostulates
Removes all postulates in the given collection.- Parameters:
postulates
- some postulates
-
evaluate
Evaluates all postulates of this evaluator on the given approach onnum
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
Evaluates all postulates of this evaluator on the given approach onnum
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
-