Skip to content

Commit

Permalink
overload linear, jacobian and hessian methods
Browse files Browse the repository at this point in the history
  • Loading branch information
afossa committed May 28, 2024
1 parent 8b9a283 commit c4af3cc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/DACE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ module DACE
# wrappers for map inversion
invert(v::Vector{<:DA}) = Vector{DA}(invert(AlgebraicVector(v)))

# wrappers for linear part, Jacobian and Hessian
linear(v::Vector{<:DA}) = linear(AlgebraicVector(v))
jacobian(v::Vector{<:DA}) = jacobian(AlgebraicVector(v))
hessian(v::Vector{<:DA}) = stack(hessian(AlgebraicVector(v)), dims=3)

# wrappers for compilation and evaluation of DA objects
compile(v::Vector{<:DA}) = compile(StdVector{DA}(v))
for R in (DA, Float64)
Expand Down

0 comments on commit c4af3cc

Please sign in to comment.