Class RdToR1

java.lang.Object
org.drip.function.definition.RdToR1
Direct Known Subclasses:
AffineBoundMultivariate, AffineMultivariate, CovarianceEllipsoidMultivariate, LagrangianMultivariate, MultivariateRandom, ObjectiveFunction, RdDecisionFunction, RiskObjectiveUtilityMultivariate

public abstract class RdToR1
extends java.lang.Object
RdToR1 provides the evaluation of the Rd To R1 objective function and its derivatives for a specified set of Rd variates. Default implementation of the derivatives are for non-analytical lack box objective functions.

Author:
Lakshmi Krishnamurthy
  • Method Summary

    Modifier and Type Method Description
    double derivative​(double[] adblVariate, int iVariateIndex, int iOrder)
    Calculate the derivative as a double
    Differential differential​(double[] adblVariate, int iVariateIndex, int iOrder)
    Calculate the Differential
    abstract int dimension()
    Retrieve the Dimension of the Input Variate
    abstract double evaluate​(double[] adblVariate)
    Evaluate for the given Input Variates
    UnitVector gradient​(double[] adblVariate)
    Construct an Instance of the Unit Gradient Vector at the given Input Variates
    double gradientModulus​(double[] adblVariate)
    Compute the Modulus of the Gradient at the Specified Variate location
    RdToR1 gradientModulusFunction()
    Generate the Gradient Modulus Function
    double[][] hessian​(double[] adblVariate)
    Evaluate The Hessian for the given Input Variates
    double integrate​(double[] adblLeftEdge, double[] adblRightEdge)
    Integrate over the given Input Range Using Uniform Monte-Carlo
    double[] jacobian​(double[] adblVariate)
    Evaluate the Jacobian for the given Input Variates
    VariateOutputPair maxima​(double[] adblVariateLeft, double[] adblVariateRight)
    Compute the Maximum VOP within the Variate Array Range Using Uniform Monte-Carlo
    VariateOutputPair minima​(double[] adblVariateLeft, double[] adblVariateRight)
    Compute the Minimum VOP within the Variate Array Range Using Uniform Monte-Carlo
    static boolean ValidateInput​(double[] adblVariate)
    Validate the Input Double Array

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • ValidateInput

      public static final boolean ValidateInput​(double[] adblVariate)
      Validate the Input Double Array
      Parameters:
      adblVariate - The Input Double Array
      Returns:
      The Input Double Array consists of valid Values
    • dimension

      public abstract int dimension()
      Retrieve the Dimension of the Input Variate
      Returns:
      The Dimension of the Input Variate
    • evaluate

      public abstract double evaluate​(double[] adblVariate) throws java.lang.Exception
      Evaluate for the given Input Variates
      Parameters:
      adblVariate - Array of Input Variates
      Returns:
      The Calculated Value
      Throws:
      java.lang.Exception - Thrown if the Evaluation cannot be done
    • differential

      public Differential differential​(double[] adblVariate, int iVariateIndex, int iOrder)
      Calculate the Differential
      Parameters:
      adblVariate - Variate Array at which the derivative is to be calculated
      iVariateIndex - Index of the Variate whose Derivative is to be computed
      iOrder - Order of the derivative to be computed
      Returns:
      The Derivative
    • derivative

      public double derivative​(double[] adblVariate, int iVariateIndex, int iOrder) throws java.lang.Exception
      Calculate the derivative as a double
      Parameters:
      adblVariate - Variate Array at which the derivative is to be calculated
      iVariateIndex - Index of the Variate whose Derivative is to be computed
      iOrder - Order of the derivative to be computed
      Returns:
      The Derivative
      Throws:
      java.lang.Exception - Thrown if the Derivative cannot be calculated
    • jacobian

      public double[] jacobian​(double[] adblVariate)
      Evaluate the Jacobian for the given Input Variates
      Parameters:
      adblVariate - Array of Input Variates
      Returns:
      The Jacobian Array
    • gradient

      public UnitVector gradient​(double[] adblVariate)
      Construct an Instance of the Unit Gradient Vector at the given Input Variates
      Parameters:
      adblVariate - Array of Input Variates
      Returns:
      Instance of the Unit Gradient Vector Array
    • hessian

      public double[][] hessian​(double[] adblVariate)
      Evaluate The Hessian for the given Input Variates
      Parameters:
      adblVariate - Array of Input Variates
      Returns:
      The Hessian Matrix
    • integrate

      public double integrate​(double[] adblLeftEdge, double[] adblRightEdge) throws java.lang.Exception
      Integrate over the given Input Range Using Uniform Monte-Carlo
      Parameters:
      adblLeftEdge - Array of Input Left Edge
      adblRightEdge - Array of Input Right Edge
      Returns:
      The Result of the Integration over the specified Range
      Throws:
      java.lang.Exception - Thrown if the Integration cannot be done
    • maxima

      public VariateOutputPair maxima​(double[] adblVariateLeft, double[] adblVariateRight)
      Compute the Maximum VOP within the Variate Array Range Using Uniform Monte-Carlo
      Parameters:
      adblVariateLeft - The Range Left End Array
      adblVariateRight - The Range Right End Array
      Returns:
      The Maximum VOP
    • minima

      public VariateOutputPair minima​(double[] adblVariateLeft, double[] adblVariateRight)
      Compute the Minimum VOP within the Variate Array Range Using Uniform Monte-Carlo
      Parameters:
      adblVariateLeft - The Range Left End Array
      adblVariateRight - The Range Right End Array
      Returns:
      The Minimum VOP
    • gradientModulus

      public double gradientModulus​(double[] adblVariate) throws java.lang.Exception
      Compute the Modulus of the Gradient at the Specified Variate location
      Parameters:
      adblVariate - The Variate Array location
      Returns:
      The Modulus of the Gradient at the Specified Variate location
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • gradientModulusFunction

      public RdToR1 gradientModulusFunction()
      Generate the Gradient Modulus Function
      Returns:
      The Gradient Modulus Function