Package org.evoludo.simulator.modules
Enum Class Continuous.Benefits
- All Implemented Interfaces:
Serializable
,Comparable<Continuous.Benefits>
,Constable
,CLOption.Key
- Enclosing class:
Continuous
Selected benefit functions to translate continuous traits into payoffs. Enum
on steroids. Currently available benefit functions are:
- 0
- Linear benefit function (independent of focal): \(B(x,y)=b_0\,y\).
- 1
- Quadratic benefit function (independent of focal): \(B(x,y)=b_0\,y+\b_1\,y^2\).
- 2
- Saturating benefit function following a square root (independent of focal): \(B(x,y)=b_0\sqrt{y}\).
- 3
- Saturating benefit function following a logarithm (independent of focal): \(B(x,y)=b_0\log{b_1\,y+1}\).
- 4
- Saturating benefit function following an exponential (independent of focal): \(B(x,y)=b_0 \left(1-e^{-b_1\,y}\right)\).
- 10
- Linear benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)\).
- 11
- Quadratic benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)+\b_1\,(x+y)^2\).
- 12
- Saturating benefit function following a square root (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\sqrt{x+y}\).
- 13
- Saturating benefit function following a logarithm (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\log{b_1\,(x+y)+1}\).
- 14
- Saturating benefit function following an exponential (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0 \left(1-e^{-b_1\,(x+y)}\right)\).
- 20
- Linear benefit function (with interaction term): \(B(x,y)=b_0\,x=b_1\,y+\b_2\,x\,y\).
- 30
- Linear benefit function (independent of opponent): \(B(x,y)=b_0\,x\).
- 31
- Quadratic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2\).
- 32
- Cubic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2+b_2\,x^3\).
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLinear benefit function (independent of opponent): \(B(x,y)=b_0\,x\).Quadratic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2\).Cubic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2+b_2\,x^3\).Linear benefit function (with interaction term): \(B(x,y)=b_0\,x=b_1\,y+\b_2\,x\,y\).Saturating benefit function following an exponential (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0 \left(1-e^{-b_1\,(x+y)}\right)\).Linear benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)\).Saturating benefit function following a logarithm (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\log{b_1\,(x+y)+1}\).Quadratic benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)+\b_1\,(x+y)^2\).Saturating benefit function following a square root (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\sqrt{x+y}\).Saturating benefit function following an exponential (independent of focal): \(B(x,y)=b_0 \left(1-e^{-b_1\,y}\right)\).Linear benefit function (independent of focal): \(B(x,y)=b_0\,y\).Saturating benefit function following a logarithm (independent of focal): \(B(x,y)=b_0\log{b_1\,y+1}\).Quadratic benefit function (independent of focal): \(B(x,y)=b_0\,y+\b_1\,y^2\).Saturating benefit function following a square root (independent of focal): \(B(x,y)=b_0\sqrt{y}\). -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Return key of in this collection.getTitle()
Brief description of purpose of this key.toString()
static Continuous.Benefits
Returns the enum constant of this class with the specified name.static Continuous.Benefits[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface CLOption.Key
getDescription
-
Enum Constant Details
-
YOU_LINEAR
Linear benefit function (independent of focal): \(B(x,y)=b_0\,y\). -
YOU_QUAD
Quadratic benefit function (independent of focal): \(B(x,y)=b_0\,y+\b_1\,y^2\). -
YOU_SQRT
Saturating benefit function following a square root (independent of focal): \(B(x,y)=b_0\sqrt{y}\). -
YOU_LOG
Saturating benefit function following a logarithm (independent of focal): \(B(x,y)=b_0\log{b_1\,y+1}\). -
YOU_EXP
Saturating benefit function following an exponential (independent of focal): \(B(x,y)=b_0 \left(1-e^{-b_1\,y}\right)\). -
WE_LINEAR
Linear benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)\). -
WE_QUAD
Quadratic benefit function (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\,(x+y)+\b_1\,(x+y)^2\). -
WE_SQRT
Saturating benefit function following a square root (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\sqrt{x+y}\). -
WE_LOG
Saturating benefit function following a logarithm (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0\log{b_1\,(x+y)+1}\). -
WE_EXP
Saturating benefit function following an exponential (sum of focal, \(x\), and opponent, \(y\), traits): \(B(x,y)=b_0 \left(1-e^{-b_1\,(x+y)}\right)\). -
MEYOU_LINEAR
Linear benefit function (with interaction term): \(B(x,y)=b_0\,x=b_1\,y+\b_2\,x\,y\). -
ME_LINEAR
Linear benefit function (independent of opponent): \(B(x,y)=b_0\,x\). -
ME_QUAD
Quadratic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2\). -
ME_QUBIC
Cubic benefit function (independent of opponent): \(B(x,y)=b_0\,x+b_1\,x^2+b_2\,x^3\).
-
-
Field Details
-
Constructor Details
-
Benefits
Create a new type of benefit function with keykey
and descriptiontitle
as well asnParams
parameters.- Parameters:
key
- the identifier for parsing of command line optiontitle
- the summary of the benefit functionnParams
- the number of parameters
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<Continuous.Benefits>
-
getKey
Description copied from interface:CLOption.Key
Return key of in this collection. Used when parsing command line options.- Specified by:
getKey
in interfaceCLOption.Key
- Returns:
- the key of the command line option
-
getTitle
Description copied from interface:CLOption.Key
Brief description of purpose of this key. Used in GUI and in help display.- Specified by:
getTitle
in interfaceCLOption.Key
- Returns:
- the title of the command line option
- See Also:
-