Class Observation
java.lang.Object
org.moeaframework.analysis.collector.Observation
- All Implemented Interfaces:
Serializable
,Comparable<Observation>
An observation records information about an algorithm at a point in time.
- See Also:
-
Constructor Summary
ConstructorDescriptionObservation
(int nfe) Creates a new observation recorded at the given number of function evaluations. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Observation other) Returns the value of the given key.int
getNFE()
Returns the number of function evaluations during which this record was created.keys()
Returns the keys recorded in this observation.void
set
(String key, Serializable value) Sets the value of the given key.
-
Constructor Details
-
Observation
public Observation(int nfe) Creates a new observation recorded at the given number of function evaluations.- Parameters:
nfe
- the number of function evaluations
-
-
Method Details
-
getNFE
public int getNFE()Returns the number of function evaluations during which this record was created.- Returns:
- the number of function evaluations
-
keys
Returns the keys recorded in this observation.- Returns:
- the keys
-
get
Returns the value of the given key.- Parameters:
key
- the key- Returns:
- the value
- Throws:
IllegalArgumentException
- if no observation exists for the key
-
set
Sets the value of the given key. At a minimum, these values must be serializable to support saving these observations, but we recommend using primitive types (int, double, etc.) whenever possible for formatted output.- Parameters:
key
- the keyvalue
- the value
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Observation>
-