Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tangi Migot <[email protected]>
  • Loading branch information
amontoison and tmigot committed Aug 5, 2024
1 parent 7995e8b commit 9fc9bcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sparse_hessian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function SparseADHessian(
coloring::AbstractColoringAlgorithm = GreedyColoringAlgorithm(),
detector::AbstractSparsityDetector = TracerSparsityDetector(),
kwargs...,
) where {S}
)
H = compute_hessian_sparsity(f, nvar, c!, ncon, detector = detector)
SparseADHessian(nvar, f, ncon, c!, H; x0, coloring, kwargs...)
end
Expand Down Expand Up @@ -128,7 +128,7 @@ function SparseReverseADHessian(
coloring::AbstractColoringAlgorithm = GreedyColoringAlgorithm(),
detector::AbstractSparsityDetector = TracerSparsityDetector(),
kwargs...,
) where {T}
)
H = compute_hessian_sparsity(f, nvar, c!, ncon, detector = detector)
SparseReverseADHessian(nvar, f, ncon, c!, H; x0, coloring, kwargs...)
end
Expand Down
2 changes: 1 addition & 1 deletion src/sparse_jacobian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function SparseADJacobian(
coloring::AbstractColoringAlgorithm = GreedyColoringAlgorithm(),
detector::AbstractSparsityDetector = TracerSparsityDetector(),
kwargs...,
) where {T}
)
output = similar(x0, ncon)
J = compute_jacobian_sparsity(c!, output, x0, detector = detector)
SparseADJacobian(nvar, f, ncon, c!, J; x0, coloring, kwargs...)
Expand Down

0 comments on commit 9fc9bcf

Please sign in to comment.