Skip to main content

implicit_tangent

Function implicit_tangent 

Source
pub fn implicit_tangent<F: Float>(
    tape: &mut BytecodeTape<F>,
    z_star: &[F],
    x: &[F],
    x_dot: &[F],
    num_states: usize,
) -> Option<Vec<F>>
Expand description

Compute the implicit tangent dz*/dx · x_dot (m-vector).

Given a multi-output residual tape F: R^(m+n) → R^m with F(z*, x) = 0, computes the directional derivative dz*/dx · x_dot = -F_z^{-1} · (F_x · x_dot).

This solves a single linear system rather than computing the full Jacobian, which is more efficient when only one direction is needed.

Returns None if F_z is singular.