Skip to main content

sparse_hessian

Function sparse_hessian 

Source
pub fn sparse_hessian<F: Float + BtapeThreadLocal>(
    f: impl FnOnce(&[BReverse<F>]) -> BReverse<F>,
    x: &[F],
) -> (F, Vec<F>, SparsityPattern, Vec<F>)
Available on crate feature bytecode only.
Expand description

Sparse Hessian via structural sparsity detection and graph coloring.

Returns (value, gradient, pattern, hessian_values). For sparse problems, this is dramatically faster than hessian.