Class ExponentialGrid

java.lang.Object
net.finmath.finitedifference.grids.AbstractGrid
net.finmath.finitedifference.grids.ExponentialGrid
All Implemented Interfaces:
Grid

public class ExponentialGrid extends AbstractGrid
Non-uniform exponential grid between minimumValue and maximumValue.

The grid points are distributed exponentially, with density concentrated near minimumValue or maximumValue depending on the parameter alpha.

If alpha = 0, the grid reduces to a uniform grid.

The grid is generated by transforming a uniform grid on [0,1] through an exponential mapping.

Author:
Michela Birtele
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExponentialGrid(int numberOfSteps, double minimumValue, double maximumValue, double alpha)
    Constructs an exponential grid with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    getDelta(double[] vector)
    Returns the spacing between grid points, generating it if necessary.
    double[]
    Returns the grid points, generating them if necessary.

    Methods inherited from class AbstractGrid

    getInteriorGrid

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExponentialGrid

      public ExponentialGrid(int numberOfSteps, double minimumValue, double maximumValue, double alpha)
      Constructs an exponential grid with the specified parameters.
      Parameters:
      numberOfSteps - The number of intervals in the grid.
      minimumValue - The lower bound of the grid interval.
      maximumValue - The upper bound of the grid interval.
      alpha - Parameter controlling grid density:
      • If alpha > 0, points cluster near maximumValue.
      • If alpha < 0, points cluster near minimumValue.
      • If alpha = 0, the grid is uniform.
  • Method Details

    • getGrid

      public double[] getGrid()
      Returns the grid points, generating them if necessary.
      Returns:
      The exponentially distributed grid points.
    • getDelta

      public double[] getDelta(double[] vector)
      Returns the spacing between grid points, generating it if necessary.
      Parameters:
      vector - Array of values at grid points (usually the grid itself).
      Returns:
      The spacing between consecutive grid points.