compress_hessian_pattern

Function compress_hessian_pattern 

Source
pub fn compress_hessian_pattern(
    sparsity: &CsrArray<f64>,
) -> Result<(CsrArray<f64>, Array2<f64>), OptimizeError>
Expand description

Compresses a sparse Hessian pattern for more efficient finite differencing

Uses a distance-2 coloring algorithm suitable for symmetric Hessian matrices. Two columns can have the same color if they are at distance > 2 in the sparsity graph.

§Arguments

  • sparsity - Sparse matrix representing the Hessian sparsity pattern

§Returns

  • Compressed sparsity pattern and compression matrix P (n x num_colors)