numopt-js
    Preparing search index...

    Function finiteDiffResidualPartialP

    • Computes the partial derivative of a constrained residual function with respect to parameters. Uses central difference method while keeping states fixed. Returns a Jacobian matrix of size (residualCount × parameterCount).

      Formula: ∂r/∂p_ij ≈ (r_i(p+h·e_j, x) - r_i(p-h·e_j, x)) / (2h)

      Parameters

      • parameters: Float64Array

        Parameter vector p

      • states: Float64Array

        State vector x (kept fixed)

      • residualFunction: ConstrainedResidualFn

        Constrained residual function r(p, x)

      • options: NumericalDifferentiationOptions = {}

        Optional numerical differentiation settings

      Returns Matrix

      Jacobian matrix ∂r/∂p