From f85f7e9be6a0a560c0769b7f0e643cf7a789fe69 Mon Sep 17 00:00:00 2001 From: franckgaga Date: Tue, 31 Mar 2026 10:45:04 -0400 Subject: [PATCH 1/2] doc: add DI.jl sparse preperation method docstrings --- ...iationInterfaceSparseMatrixColoringsExt.jl | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl b/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl index 99536977f..cae1c7eac 100644 --- a/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl +++ b/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl @@ -19,20 +19,82 @@ import SparseMatrixColorings as SMC abstract type SMCSparseJacobianPrep{SIG} <: DI.SparseJacobianPrep{SIG} end +""" + SMC.sparsity_pattern(prep::DI.SparseJacobianPrep) + +Return the sparsity pattern of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.sparsity_pattern(prep::DI.SparseJacobianPrep) = prep.sparsity + +""" + SMC.column_colors(prep::DI.SparseJacobianPrep) + +Return the column colors of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.column_colors(prep::DI.SparseJacobianPrep) = column_colors(prep.coloring_result) + +""" + SMC.column_groups(prep::DI.SparseJacobianPrep) + +Return the column groups of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.column_groups(prep::DI.SparseJacobianPrep) = column_groups(prep.coloring_result) + +""" + SMC.row_colors(prep::DI.SparseJacobianPrep) + +Return the row colors of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.row_colors(prep::DI.SparseJacobianPrep) = row_colors(prep.coloring_result) + +""" + SMC.row_groups(prep::DI.SparseJacobianPrep) + +Return the row groups of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.row_groups(prep::DI.SparseJacobianPrep) = row_groups(prep.coloring_result) + +""" + SMC.ncolors(prep::DI.SparseJacobianPrep) + +Return the number of colors of a sparse `prep` object created by [`prepare_jacobian`](@ref). +""" SMC.ncolors(prep::DI.SparseJacobianPrep) = ncolors(prep.coloring_result) + + +""" + SMC.sparsity_pattern(prep::DI.SparseHessianPrep) + +Return the sparsity pattern of a sparse `prep` object created by [`prepare_hessian`](@ref). +""" SMC.sparsity_pattern(prep::DI.SparseHessianPrep) = prep.sparsity + +""" + SMC.column_colors(prep::DI.SparseHessianPrep) + +Return the column colors of a sparse `prep` object created by [`prepare_hessian`](@ref). +""" SMC.column_colors(prep::DI.SparseHessianPrep) = column_colors(prep.coloring_result) + +""" + SMC.column_groups(prep::DI.SparseHessianPrep) + +Return the column groups of a sparse `prep` object created by [`prepare_hessian`](@ref). +""" SMC.column_groups(prep::DI.SparseHessianPrep) = column_groups(prep.coloring_result) + +""" + SMC.ncolors(prep::DI.SparseHessianPrep) + +Return the number of colors of a sparse `prep` object created by [`prepare_hessian`](@ref). +""" SMC.ncolors(prep::DI.SparseHessianPrep) = ncolors(prep.coloring_result) + include("jacobian.jl") include("jacobian_mixed.jl") include("hessian.jl") + end From 5a04461a5d9cf5ff3170f9fefbb342849c245f37 Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:09:06 +0200 Subject: [PATCH 2/2] Format with Runic --- .../DifferentiationInterfaceSparseMatrixColoringsExt.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl b/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl index cae1c7eac..384e17829 100644 --- a/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl +++ b/DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl @@ -62,7 +62,6 @@ Return the number of colors of a sparse `prep` object created by [`prepare_jacob SMC.ncolors(prep::DI.SparseJacobianPrep) = ncolors(prep.coloring_result) - """ SMC.sparsity_pattern(prep::DI.SparseHessianPrep)