Class HyperbolicSineGrid

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

public class HyperbolicSineGrid extends AbstractGrid
Non-uniform grid based on a hyperbolic sine transformation between minimumValue and maximumValue.

This grid clusters points around a specified centering value. The parameter alpha controls the degree of clustering, with larger values leading to a tighter concentration near the centering point.

The grid points are generated by applying a hyperbolic sine mapping to a uniform parameterization of the interval.

Author:
Michela Birtele
  • Constructor Summary

    Constructors
    Constructor
    Description
    HyperbolicSineGrid(int numberOfSteps, double minimumValue, double maximumValue, double centering, double alpha)
    Constructs a hyperbolic sine 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

    • HyperbolicSineGrid

      public HyperbolicSineGrid(int numberOfSteps, double minimumValue, double maximumValue, double centering, double alpha)
      Constructs a hyperbolic sine 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.
      centering - The point around which the grid points cluster.
      alpha - Parameter controlling the clustering strength around centering.
  • Method Details

    • getGrid

      public double[] getGrid()
      Returns the grid points, generating them if necessary.
      Returns:
      The grid points distributed via the hyperbolic sine transformation.
    • 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.