Class UniformGrid

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

public class UniformGrid extends AbstractGrid
Implementation of the Grid interface representing a uniform spatial grid.

This grid divides the interval between minimumValue and maximumValue into equal-sized intervals defined by numberOfSteps.

Author:
Michela Birtele
  • Constructor Summary

    Constructors
    Constructor
    Description
    UniformGrid(int numberOfSteps, double minimumValue, double maximumValue)
    Constructs a uniform grid with the specified number of steps and boundary values.
  • 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

    • UniformGrid

      public UniformGrid(int numberOfSteps, double minimumValue, double maximumValue)
      Constructs a uniform grid with the specified number of steps and boundary values.
      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.
  • Method Details

    • getGrid

      public double[] getGrid()
      Returns the grid points, generating them if necessary.
      Returns:
      The uniformly spaced 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.