Class CountingMeasure

java.lang.Object
All Implemented Interfaces:
Serializable, Measure<Long>, PullMeasure<Long>, PushMeasure<Long>, DescribedEntity

public class CountingMeasure extends SimplePushMeasure<Long> implements PullMeasure<Long>, PushMeasure<Long>
A CountingMeasure provides a simple way to evaluate a number of occurrences. For instance, it can be used to count how many solutions have been generated within an algorithm, how many evaluations have been computed, how many rounds have been run, etc. If these occurrences are provided by some PushMeasures, you can use link(PushMeasure) to register the CountingMeasure to these PushMeasures. Otherwise, use increment() when the CountingMeasure need to count one more occurrence. In order to get the count, one can access it immediately through get() or when it is updated by registering a listener with SimplePushMeasure.register(MeasureListener).
Author:
Matthieu Vergne
See Also: