Class VectorFieldFirstOrderDifferentiator

  • All Implemented Interfaces:
    Differentiator<DoubleArray,​DoubleArray,​DoubleMatrix>

    public class VectorFieldFirstOrderDifferentiator
    extends Object
    implements Differentiator<DoubleArray,​DoubleArray,​DoubleMatrix>
    Differentiates a vector field (i.e. there is a vector value for every point in some vector space) with respect to the vector space using finite difference.

    For a function $\mathbf{y} = f(\mathbf{x})$ where $\mathbf{x}$ is a n-dimensional vector and $\mathbf{y}$ is a m-dimensional vector, this class produces the Jacobian function $\mathbf{J}(\mathbf{x})$, i.e. a function that returns the Jacobian for each point $\mathbf{x}$, where $\mathbf{J}$ is the $m \times n$ matrix $\frac{dy_i}{dx_j}$

    • Constructor Detail

      • VectorFieldFirstOrderDifferentiator

        public VectorFieldFirstOrderDifferentiator()
        Creates an instance using the default value of eps (10-5) and central differencing type.
      • VectorFieldFirstOrderDifferentiator

        public VectorFieldFirstOrderDifferentiator​(FiniteDifferenceType differenceType)
        Creates an instance using the default value of eps (10-5).
        Parameters:
        differenceType - the differencing type to be used in calculating the gradient function
      • VectorFieldFirstOrderDifferentiator

        public VectorFieldFirstOrderDifferentiator​(double eps)
        Creates an instance using the central differencing type.

        If the size of the domain is very small or very large, consider re-scaling first. If this value is too small, the result will most likely be dominated by noise. Use around 10-5 times the domain size.

        Parameters:
        eps - the step size used to approximate the derivative
      • VectorFieldFirstOrderDifferentiator

        public VectorFieldFirstOrderDifferentiator​(FiniteDifferenceType differenceType,
                                                   double eps)
        Creates an instance.

        If the size of the domain is very small or very large, consider re-scaling first. If this value is too small, the result will most likely be dominated by noise. Use around 10-5 times the domain size.

        Parameters:
        differenceType - the differencing type to be used in calculating the gradient function
        eps - the step size used to approximate the derivative