Enum Class Continuous.Costs

All Implemented Interfaces:
Serializable, Comparable<Continuous.Costs>, Constable, CLOption.Key
Enclosing class:
Continuous

public static enum Continuous.Costs extends Enum<Continuous.Costs> implements CLOption.Key
Selected cost functions to translate continuous traits into payoffs. Enum on steroids. Currently available cost functions are:
0
Linear cost function (independent of opponent): \(C(x,y)=c_0\,x\).
1
Quadratic cost function (independent of opponent): \(C(x,y)=c_0\,x+c_1\,x^2\).
2
Square root cost function (independent of opponent): \(C(x,y)=c_0 \sqrt{x}\).
3
Logarithmic cost function (independent of opponent): \(C(x,y)=c_0 \ln(c_1\,x+1)\).
4
Exponential cost function (independent of opponent): \(C(x,y)=c_0 (1-\exp(-c_1\,x))\).
10
Linear cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)\).
11
Quadratic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2\).
12
Cubic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3\).
13
Quartic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3+c_3 (x+y)^4\).
20
Linear cost function (cross terms of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0\,x+c_1\,y+c_2\,x\,y\).
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Exponential cost function (independent of opponent): \(C(x,y)=c_0 (1-\exp(-c_1\,x))\).
    Linear cost function (independent of opponent): \(C(x,y)=c_0\,x\).
    Logarithmic cost function (independent of opponent): \(C(x,y)=c_0 \ln(c_1\,x+1)\).
    Quadratic cost function (independent of opponent): \(C(x,y)=c_0\,x+c_1\,x^2\).
    Square root cost function (independent of opponent): \(C(x,y)=c_0 \sqrt{x}\).
    Linear cost function (cross terms of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0\,x+c_1\,y+c_2\,x\,y\).
    Linear cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)\).
    Quadratic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2\).
    Quartic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3+c_3 (x+y)^4\).
    Cubic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3\).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) String
    The key of the cost function.
    (package private) int
    The number of parameters of the cost function.
    (package private) String
    The brief description of the cost function for the help display.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Costs(String key, String title, int nParams)
    Create a new type of cost function with key key and description title as well as nParams parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return key of in this collection.
    Brief description of purpose of this key.
     
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface CLOption.Key

    getDescription
  • Enum Constant Details

    • ME_LINEAR

      public static final Continuous.Costs ME_LINEAR
      Linear cost function (independent of opponent): \(C(x,y)=c_0\,x\).
    • ME_QUAD

      public static final Continuous.Costs ME_QUAD
      Quadratic cost function (independent of opponent): \(C(x,y)=c_0\,x+c_1\,x^2\).
    • ME_SQRT

      public static final Continuous.Costs ME_SQRT
      Square root cost function (independent of opponent): \(C(x,y)=c_0 \sqrt{x}\).
    • ME_LOG

      public static final Continuous.Costs ME_LOG
      Logarithmic cost function (independent of opponent): \(C(x,y)=c_0 \ln(c_1\,x+1)\).
    • ME_EXP

      public static final Continuous.Costs ME_EXP
      Exponential cost function (independent of opponent): \(C(x,y)=c_0 (1-\exp(-c_1\,x))\).
    • WE_LINEAR

      public static final Continuous.Costs WE_LINEAR
      Linear cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)\).
    • WE_QUAD

      public static final Continuous.Costs WE_QUAD
      Quadratic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2\).
    • WE_QUBIC

      public static final Continuous.Costs WE_QUBIC
      Cubic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3\).
    • WE_QUARTIC

      public static final Continuous.Costs WE_QUARTIC
      Quartic cost function (sum of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0 (x+y)+c_1 (x+y)^2+c_2 (x+y)^3+c_3 (x+y)^4\).
    • MEYOU_LINEAR

      public static final Continuous.Costs MEYOU_LINEAR
      Linear cost function (cross terms of focal, \(x\), and opponent, \(y\), traits): \(C(x,y)=c_0\,x+c_1\,y+c_2\,x\,y\).
  • Field Details

    • key

      String key
      The key of the cost function. Used when parsing command line options.
      See Also:
    • title

      String title
      The brief description of the cost function for the help display.
      See Also:
    • nParams

      int nParams
      The number of parameters of the cost function.
  • Constructor Details

    • Costs

      private Costs(String key, String title, int nParams)
      Create a new type of cost function with key key and description title as well as nParams parameters.
      Parameters:
      key - the identifier for parsing of command line option
      title - the summary of the cost function
      nParams - the number of parameters
  • Method Details

    • values

      public static Continuous.Costs[] 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

      public static Continuous.Costs valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Continuous.Costs>
    • getKey

      public String getKey()
      Description copied from interface: CLOption.Key
      Return key of in this collection. Used when parsing command line options.
      Specified by:
      getKey in interface CLOption.Key
      Returns:
      the key of the command line option
    • getTitle

      public String 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 interface CLOption.Key
      Returns:
      the title of the command line option
      See Also: