Skip to content

Commit 7425ed3

Browse files
Merge pull request #37 from matthieugomez/patch-1
Update README.md
2 parents 681f48a + da7edc4 commit 7425ed3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ variables. This is summarized as:
3535
## Scalar Derivatives
3636

3737
```julia
38-
finite_difference_derivative(f, x::T, fdtype::Type{T1}=Val{:central},
38+
DiffEqDiffTools.finite_difference_derivative(f, x::T, fdtype::Type{T1}=Val{:central},
3939
returntype::Type{T2}=eltype(x), f_x::Union{Nothing,T}=nothing)
4040
```
4141

@@ -46,15 +46,15 @@ finite_difference_derivative(f, x::T, fdtype::Type{T1}=Val{:central},
4646
```julia
4747
# Cache-less but non-allocating if `fx` and `epsilon` are supplied
4848
# fx must be f(x)
49-
finite_difference_derivative(
49+
DiffEqDiffTools.finite_difference_derivative(
5050
f,
5151
x :: AbstractArray{<:Number},
5252
fdtype :: Type{T1} = Val{:central},
5353
returntype :: Type{T2} = eltype(x), # return type of f
5454
fx :: Union{Nothing,AbstractArray{<:Number}} = nothing,
5555
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing)
5656

57-
finite_difference_derivative!(
57+
DiffEqDiffTools.finite_difference_derivative!(
5858
df :: AbstractArray{<:Number},
5959
f,
6060
x :: AbstractArray{<:Number},
@@ -64,15 +64,15 @@ finite_difference_derivative!(
6464
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing)
6565

6666
# Cached
67-
finite_difference_derivative!(df::AbstractArray{<:Number}, f,
67+
DiffEqDiffTools.finite_difference_derivative!(df::AbstractArray{<:Number}, f,
6868
x::AbstractArray{<:Number},
6969
cache::DerivativeCache{T1,T2,fdtype,returntype})
7070
```
7171

7272
### Allocating and Non-Allocating Constructor
7373

7474
```julia
75-
DerivativeCache(
75+
DiffEqDiffTools.DerivativeCache(
7676
x :: AbstractArray{<:Number},
7777
fx :: Union{Nothing,AbstractArray{<:Number}} = nothing,
7878
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing,
@@ -90,23 +90,23 @@ This allocates either `fx` or `epsilon` if these are nothing and they are needed
9090

9191
```julia
9292
# Cache-less
93-
finite_difference_gradient(f, x, fdtype::Type{T1}=Val{:central},
93+
DiffEqDiffTools.finite_difference_gradient(f, x, fdtype::Type{T1}=Val{:central},
9494
returntype::Type{T2}=eltype(x),
9595
inplace::Type{Val{T3}}=Val{true})
96-
finite_difference_gradient!(df, f, x, fdtype::Type{T1}=Val{:central},
96+
DiffEqDiffTools.finite_difference_gradient!(df, f, x, fdtype::Type{T1}=Val{:central},
9797
returntype::Type{T2}=eltype(df),
9898
inplace::Type{Val{T3}}=Val{true})
9999

100100
# Cached
101-
finite_difference_gradient!(df::AbstractArray{<:Number}, f,
101+
DiffEqDiffTools.finite_difference_gradient!(df::AbstractArray{<:Number}, f,
102102
x::AbstractArray{<:Number},
103103
cache::GradientCache)
104104
```
105105

106106
### Allocating Cache Constructor
107107

108108
```julia
109-
GradientCache(
109+
DiffEqDiffTools.GradientCache(
110110
df :: Union{<:Number,AbstractArray{<:Number}},
111111
x :: Union{<:Number, AbstractArray{<:Number}},
112112
fdtype :: Type{T1} = Val{:central},
@@ -117,7 +117,7 @@ GradientCache(
117117
### Non-Allocating Cache Constructor
118118

119119
```julia
120-
GradientCache(
120+
DiffEqDiffTools.GradientCache(
121121
c1 :: Union{Nothing,AbstractArray{<:Number}},
122122
c2 :: Union{Nothing,AbstractArray{<:Number}},
123123
fx :: Union{Nothing,<:Number,AbstractArray{<:Number}} = nothing,
@@ -129,7 +129,7 @@ GradientCache(
129129
Note that here `fx` is a cached function call of `f`. If you provide `fx`, then
130130
`fx` will be used in the forward differencing method to skip a function call.
131131
It is on you to make sure that you update `cache.fx` every time before
132-
calling `finite_difference_gradient!`. A good use of this is if you have a
132+
calling `DiffEqDiffTools.finite_difference_gradient!`. A good use of this is if you have a
133133
cache array for the output of `fx` already being used, you can make it alias
134134
into the differencing algorithm here.
135135

@@ -139,21 +139,21 @@ into the differencing algorithm here.
139139

140140
```julia
141141
# Cache-less
142-
finite_difference_jacobian(f, x::AbstractArray{<:Number},
142+
DiffEqDiffTools.finite_difference_jacobian(f, x::AbstractArray{<:Number},
143143
fdtype :: Type{T1}=Val{:central},
144144
returntype :: Type{T2}=eltype(x),
145145
inplace :: Type{Val{T3}}=Val{true})
146146

147147
# Cached
148-
finite_difference_jacobian(f,x,cache::JacobianCache)
149-
finite_difference_jacobian!(J::AbstractMatrix{<:Number},f,
148+
DiffEqDiffTools.finite_difference_jacobian(f,x,cache::JacobianCache)
149+
DiffEqDiffTools.finite_difference_jacobian!(J::AbstractMatrix{<:Number},f,
150150
x::AbstractArray{<:Number},cache::JacobianCache)
151151
```
152152

153153
### Allocating Cache Constructor
154154

155155
```julia
156-
JacobianCache(
156+
DiffEqDiffTools.JacobianCache(
157157
x,
158158
fdtype :: Type{T1} = Val{:central},
159159
returntype :: Type{T2} = eltype(x),
@@ -165,7 +165,7 @@ This assumes the Jacobian is square.
165165
### Non-Allocating Cache Constructor
166166

167167
```julia
168-
JacobianCache(
168+
DiffEqDiffTools.JacobianCache(
169169
x1 ,
170170
fx ,
171171
fx1,

0 commit comments

Comments
 (0)