Class InstrumentedAlgorithm<T extends Algorithm>

java.lang.Object
org.moeaframework.algorithm.extension.AlgorithmWrapper<T>
org.moeaframework.analysis.runtime.InstrumentedAlgorithm<T>
Type Parameters:
T - the type of the algorithm
All Implemented Interfaces:
Algorithm, Extensible, Configurable, Named, Stateful

public class InstrumentedAlgorithm<T extends Algorithm> extends AlgorithmWrapper<T>
Wraps an algorithm to indicate it is instrumented to collect runtime data.
  • Constructor Details

    • InstrumentedAlgorithm

      public InstrumentedAlgorithm(T algorithm)
      Wraps the given algorithm to create an instrumented version.
      Parameters:
      algorithm - the algorithm
  • Method Details

    • registerExtension

      public InstrumentedExtension registerExtension(Frequency frequency)
      Registers the extension with the algorithm if one does not already exist.
      Parameters:
      frequency - the frequency
      Returns:
      the extension
    • addCollector

      public void addCollector(Collector collector)
      Adds a collector to this instrumented algorithm. The collector should have already been attached to the algorithm.
      Parameters:
      collector - the collector
    • getSeries

      public ResultSeries getSeries()
      Returns the collected runtime data as a result series. Each result entry contains the approximation set from Algorithm.getResult() along with any properties stored by the collectors.
      Returns:
      the result series