Class GaussianGrid

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

public class GaussianGrid extends AbstractGrid
Non-uniform grid based on the Gaussian (normal) distribution between minimumValue and maximumValue.

The grid points are distributed according to the cumulative distribution function (CDF) of a normal distribution with mean centering and standard deviation sigma. This results in a higher density of points near the centering value and sparser points further away.

The grid is constructed by mapping uniformly spaced probabilities between the CDF values at minimumValue and maximumValue back to the original domain using the inverse CDF (quantile function).

Author:
Michela Birtele
  • Constructor Summary

    Constructors
    Constructor
    Description
    GaussianGrid(int numberOfSteps, double minimumValue, double maximumValue, double centering, double sigma)
    Constructs a Gaussian-distributed grid.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    getDelta(double[] vector)
    Returns the spacing (delta) between consecutive grid points, generating it if necessary.
    double[]
    Returns the generated 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

    • GaussianGrid

      public GaussianGrid(int numberOfSteps, double minimumValue, double maximumValue, double centering, double sigma)
      Constructs a Gaussian-distributed grid.
      Parameters:
      numberOfSteps - The number of intervals in the grid.
      minimumValue - The lower bound of the grid.
      maximumValue - The upper bound of the grid.
      centering - The mean (center) of the Gaussian distribution.
      sigma - The standard deviation controlling the spread around the centering.
  • Method Details

    • getGrid

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

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