numopt-js
    Preparing search index...

    Function finiteDiffConstraintPartialP

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

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

      Parameters

      • parameters: Float64Array

        Parameter vector p

      • states: Float64Array

        State vector x (kept fixed)

      • constraintFunction: ConstraintFn

        Constraint function c(p, x)

      • options: NumericalDifferentiationOptions = {}

        Optional numerical differentiation settings

      Returns Matrix

      Jacobian matrix ∂c/∂p