Skip to content

Commit f85f7e9

Browse files
committed
doc: add DI.jl sparse preperation method docstrings
1 parent 1a1ff88 commit f85f7e9

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

DifferentiationInterface/ext/DifferentiationInterfaceSparseMatrixColoringsExt/DifferentiationInterfaceSparseMatrixColoringsExt.jl

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,82 @@ import SparseMatrixColorings as SMC
1919

2020
abstract type SMCSparseJacobianPrep{SIG} <: DI.SparseJacobianPrep{SIG} end
2121

22+
"""
23+
SMC.sparsity_pattern(prep::DI.SparseJacobianPrep)
24+
25+
Return the sparsity pattern of a sparse `prep` object created by [`prepare_jacobian`](@ref).
26+
"""
2227
SMC.sparsity_pattern(prep::DI.SparseJacobianPrep) = prep.sparsity
28+
29+
"""
30+
SMC.column_colors(prep::DI.SparseJacobianPrep)
31+
32+
Return the column colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
33+
"""
2334
SMC.column_colors(prep::DI.SparseJacobianPrep) = column_colors(prep.coloring_result)
35+
36+
"""
37+
SMC.column_groups(prep::DI.SparseJacobianPrep)
38+
39+
Return the column groups of a sparse `prep` object created by [`prepare_jacobian`](@ref).
40+
"""
2441
SMC.column_groups(prep::DI.SparseJacobianPrep) = column_groups(prep.coloring_result)
42+
43+
"""
44+
SMC.row_colors(prep::DI.SparseJacobianPrep)
45+
46+
Return the row colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
47+
"""
2548
SMC.row_colors(prep::DI.SparseJacobianPrep) = row_colors(prep.coloring_result)
49+
50+
"""
51+
SMC.row_groups(prep::DI.SparseJacobianPrep)
52+
53+
Return the row groups of a sparse `prep` object created by [`prepare_jacobian`](@ref).
54+
"""
2655
SMC.row_groups(prep::DI.SparseJacobianPrep) = row_groups(prep.coloring_result)
56+
57+
"""
58+
SMC.ncolors(prep::DI.SparseJacobianPrep)
59+
60+
Return the number of colors of a sparse `prep` object created by [`prepare_jacobian`](@ref).
61+
"""
2762
SMC.ncolors(prep::DI.SparseJacobianPrep) = ncolors(prep.coloring_result)
2863

64+
65+
66+
"""
67+
SMC.sparsity_pattern(prep::DI.SparseHessianPrep)
68+
69+
Return the sparsity pattern of a sparse `prep` object created by [`prepare_hessian`](@ref).
70+
"""
2971
SMC.sparsity_pattern(prep::DI.SparseHessianPrep) = prep.sparsity
72+
73+
"""
74+
SMC.column_colors(prep::DI.SparseHessianPrep)
75+
76+
Return the column colors of a sparse `prep` object created by [`prepare_hessian`](@ref).
77+
"""
3078
SMC.column_colors(prep::DI.SparseHessianPrep) = column_colors(prep.coloring_result)
79+
80+
"""
81+
SMC.column_groups(prep::DI.SparseHessianPrep)
82+
83+
Return the column groups of a sparse `prep` object created by [`prepare_hessian`](@ref).
84+
"""
3185
SMC.column_groups(prep::DI.SparseHessianPrep) = column_groups(prep.coloring_result)
86+
87+
"""
88+
SMC.ncolors(prep::DI.SparseHessianPrep)
89+
90+
Return the number of colors of a sparse `prep` object created by [`prepare_hessian`](@ref).
91+
"""
3292
SMC.ncolors(prep::DI.SparseHessianPrep) = ncolors(prep.coloring_result)
3393

94+
3495
include("jacobian.jl")
3596
include("jacobian_mixed.jl")
3697
include("hessian.jl")
3798

99+
38100
end

0 commit comments

Comments
 (0)