Package org.moeaframework.core
Class DefaultEpsilons
java.lang.Object
org.moeaframework.core.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.problem.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
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the contents of this object as aTabularDatainstance, which can be used to save, print, or format the data in various ways.voidClears any overrides.protected EpsilonsfindOverride(String problemName) Finds the overridden ε values for the given problem, either one set by callingoverride(org.moeaframework.problem.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 DefaultEpsilonsReturns the default ε provider.voidOverrides the ε value for the given problem name.voidOverrides the ε value for the given problem.static voidsetInstance(DefaultEpsilons instance) Sets the default ε provider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 ofDEFAULTis 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 ofDEFAULTis 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.problem.Problem, org.moeaframework.core.Epsilons)or fromSettings.getProblemSpecificEpsilons(String).- Parameters:
problemName- the problem name- Returns:
- the ε values, or
nullif 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:FormattableReturns the contents of this object as aTabularDatainstance, which can be used to save, print, or format the data in various ways.- Specified by:
asTabularDatain interfaceFormattable<Map.Entry<String,Epsilons>> - Returns:
- the
TabularDatainstance
-