pub fn assemble_sparse(
problem: &Problem,
variables: &HashMap<String, VariableEnum>,
variable_index_map: &HashMap<String, usize>,
symbolic_structure: &SymbolicStructure,
) -> LinearizerResult<(Mat<f64>, SparseColMat<usize, f64>)>Expand description
Assemble residuals and sparse Jacobian from the current variable values.
Evaluates all residual blocks in parallel, collecting per-block Jacobian values
in column-major order. Uses the pre-computed symbolic structure to efficiently
construct the final SparseColMat.
ยงArguments
problem- The optimization problemvariables- Current variable valuesvariable_index_map- Maps variable names to their column offset in the Jacobiansymbolic_structure- Pre-computed sparsity pattern frombuild_symbolic_structure()