Class ObjectiveFunction

java.lang.Object
org.drip.function.definition.RdToR1
org.drip.portfolioconstruction.optimizer.ObjectiveFunction

public class ObjectiveFunction
extends RdToR1
ObjectiveFunction holds the Terms composing the Objective Function and their Weights.



Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • ObjectiveFunction

      public ObjectiveFunction()
      Empty Objective Function Constructor
  • Method Details

    • addObjectiveTermUnit

      public boolean addObjectiveTermUnit​(ObjectiveTermUnit objectiveTermUnit)
      Add the Objective Term Unit Instance
      Parameters:
      objectiveTermUnit - The Objective Term Unit Instance
      Returns:
      TRUE - The Objective Term Unit Instance successfully added
    • list

      public java.util.List<ObjectiveTermUnit> list()
      Retrieve the List of Objective Terms
      Returns:
      The List of Objective Terms
    • dimension

      public int dimension()
      Description copied from class: RdToR1
      Retrieve the Dimension of the Input Variate
      Specified by:
      dimension in class RdToR1
      Returns:
      The Dimension of the Input Variate
    • evaluate

      public double evaluate​(double[] variateArray) throws java.lang.Exception
      Description copied from class: RdToR1
      Evaluate for the given Input Variates
      Specified by:
      evaluate in class RdToR1
      Parameters:
      variateArray - Array of Input Variates
      Returns:
      The Calculated Value
      Throws:
      java.lang.Exception - Thrown if the Evaluation cannot be done
    • derivative

      public double derivative​(double[] variateArray, int variateIndex, int order) throws java.lang.Exception
      Description copied from class: RdToR1
      Calculate the derivative as a double
      Overrides:
      derivative in class RdToR1
      Parameters:
      variateArray - Variate Array at which the derivative is to be calculated
      variateIndex - Index of the Variate whose Derivative is to be computed
      order - Order of the derivative to be computed
      Returns:
      The Derivative
      Throws:
      java.lang.Exception - Thrown if the Derivative cannot be calculated