Class InstrumentedAlgorithm<T extends Algorithm>
java.lang.Object
org.moeaframework.algorithm.extension.AlgorithmWrapper<T>
org.moeaframework.analysis.collector.InstrumentedAlgorithm<T>
- All Implemented Interfaces:
Extensible
,Algorithm
,Configurable
,Stateful
Wraps an algorithm to indicate it is instrumented to collect runtime data.
-
Constructor Summary
ConstructorDescriptionInstrumentedAlgorithm
(T algorithm) Wraps the given algorithm to create an instrumented version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollector
(Collector collector) Adds a collector to this instrumented algorithm.Returns the observations collected from this algorithm.registerExtension
(int frequency, FrequencyType frequencyType) Methods inherited from class org.moeaframework.algorithm.extension.AlgorithmWrapper
evaluate, getAlgorithm, getExtensions, getNumberOfEvaluations, getProblem, getResult, initialize, isInitialized, isTerminated, loadState, saveState, step, terminate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.core.Algorithm
evaluateAll, evaluateAll, run, run
Methods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
Methods inherited from interface org.moeaframework.algorithm.extension.Extensible
addExtension, removeExtension
-
Constructor Details
-
InstrumentedAlgorithm
Wraps the given algorithm to create an instrumented version.- Parameters:
algorithm
- the algorithm
-
-
Method Details
-
registerExtension
-
addCollector
Adds a collector to this instrumented algorithm. The collector should have already been attached to the algorithm.- Parameters:
collector
- the collector
-
getObservations
Returns the observations collected from this algorithm.- Returns:
- the observations
-