Package org.moeaframework.analysis
Class DefaultEpsilons
java.lang.Object
org.moeaframework.analysis.DefaultEpsilons
- All Implemented Interfaces:
Displayable
,Formattable<Map.Entry<String,
Epsilons>>
Provides ε values for algorithms and archives using ε-dominance. The search order is:
- Epsilons configured by the user by calling
override(org.moeaframework.core.Problem, org.moeaframework.core.Epsilons)
- Epsilons configured by the user in the properties file "moeaframework.properties"
- Epsilons defined by the problem provider (i.e., our recommended defaults)
- The global default of
DEFAULT
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the contents of this object as aTabularData
instance, which can be used to save, print, or format the data in various ways.void
Clears any overrides.protected Epsilons
findOverride
(String problemName) Finds the overridden ε values for the given problem, either one set by callingoverride(org.moeaframework.core.Problem, org.moeaframework.core.Epsilons)
or fromSettings.getProblemSpecificEpsilons(String)
.getEpsilons
(String problemName) Returns the default ε values for the given problem.getEpsilons
(Problem problem) Returns the default ε values for the given problem.static DefaultEpsilons
Returns the default ε provider.void
Overrides the ε value for the given problem name.void
Overrides the ε value for the given problem.static void
setInstance
(DefaultEpsilons instance) Sets the default ε provider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.util.format.Displayable
display
-
Field Details
-
DEFAULT
The default ε value that is returned for any problem without an explicitly configured value.
-
-
Method Details
-
getInstance
Returns the default ε provider.- Returns:
- the default ε provider
-
setInstance
Sets the default ε provider.- Parameters:
instance
- default ε provider
-
clearOverrides
public void clearOverrides()Clears any overrides. -
getEpsilons
Returns the default ε values for the given problem. If the problem is not recognized, the default ε value ofDEFAULT
is returned.- Parameters:
problem
- the problem- Returns:
- the ε values
-
getEpsilons
Returns the default ε values for the given problem. If the problem is not recognized, the default ε value ofDEFAULT
is returned.- Parameters:
problemName
- the problem name- Returns:
- the ε values
-
findOverride
Finds the overridden ε values for the given problem, either one set by callingoverride(org.moeaframework.core.Problem, org.moeaframework.core.Epsilons)
or fromSettings.getProblemSpecificEpsilons(String)
.- Parameters:
problemName
- the problem name- Returns:
- the ε values, or
null
if no match was found
-
override
Overrides the ε value for the given problem. This expects the problem name to uniquely determine the ε values, typically implying problems with varying numbers of objectives provide distinct names.- Parameters:
problem
- the problemepsilons
- the ε values
-
override
Overrides the ε value for the given problem name. This expects the problem name to uniquely determine the ε values, typically implying problems with varying numbers of objectives provide distinct names.- Parameters:
problemName
- the problem nameepsilons
- the ε values
-
asTabularData
Description copied from interface:Formattable
Returns the contents of this object as aTabularData
instance, which can be used to save, print, or format the data in various ways.- Specified by:
asTabularData
in interfaceFormattable<Map.Entry<String,
Epsilons>> - Returns:
- the
TabularData
instance
-