Skip to content

Commit caefc42

Browse files
committed
add dir to docstrings and tests
1 parent 57694dc commit caefc42

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/dense.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Defined by [ADTypes.jl](https://github.com/SciML/ADTypes.jl).
115115
- `fdhtype::T3`: finite difference type for the Hessian
116116
- `relstep`: relative finite difference step size
117117
- `absstep`: absolute finite difference step size
118+
- `dir`: direction of the finite difference step
118119
"""
119120
Base.@kwdef struct AutoFiniteDiff{T1, T2, T3, S1, S2, S3} <: AbstractADType
120121
fdtype::T1 = Val(:forward)

test/dense.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ end
6969
@test ad.fdhtype === Val(:hcentral)
7070
@test ad.relstep === nothing
7171
@test ad.absstep === nothing
72+
@test ad.dir
7273

73-
ad = AutoFiniteDiff(; fdtype = Val(:central), fdjtype = Val(:forward), relstep = 1e-3, absstep = 1e-4)
74+
ad = AutoFiniteDiff(; fdtype = Val(:central), fdjtype = Val(:forward), relstep = 1e-3, absstep = 1e-4, dir = false)
7475
@test ad isa AbstractADType
7576
@test ad isa AutoFiniteDiff
7677
@test mode(ad) isa ForwardMode
@@ -79,6 +80,7 @@ end
7980
@test ad.fdhtype === Val(:hcentral)
8081
@test ad.relstep == 1e-3
8182
@test ad.absstep == 1e-4
83+
@test !ad.dir
8284
end
8385

8486
@testset "AutoFiniteDifferences" begin

0 commit comments

Comments
 (0)