@@ -35,7 +35,7 @@ variables. This is summarized as:
35
35
## Scalar Derivatives
36
36
37
37
``` 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 },
39
39
returntype:: Type{T2} = eltype (x), f_x:: Union{Nothing,T} = nothing )
40
40
```
41
41
@@ -46,15 +46,15 @@ finite_difference_derivative(f, x::T, fdtype::Type{T1}=Val{:central},
46
46
``` julia
47
47
# Cache-less but non-allocating if `fx` and `epsilon` are supplied
48
48
# fx must be f(x)
49
- finite_difference_derivative (
49
+ DiffEqDiffTools . finite_difference_derivative (
50
50
f,
51
51
x :: AbstractArray{<:Number} ,
52
52
fdtype :: Type{T1} = Val{:central },
53
53
returntype :: Type{T2} = eltype (x), # return type of f
54
54
fx :: Union{Nothing,AbstractArray{<:Number}} = nothing ,
55
55
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing )
56
56
57
- finite_difference_derivative! (
57
+ DiffEqDiffTools . finite_difference_derivative! (
58
58
df :: AbstractArray{<:Number} ,
59
59
f,
60
60
x :: AbstractArray{<:Number} ,
@@ -64,15 +64,15 @@ finite_difference_derivative!(
64
64
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing )
65
65
66
66
# Cached
67
- finite_difference_derivative! (df:: AbstractArray{<:Number} , f,
67
+ DiffEqDiffTools . finite_difference_derivative! (df:: AbstractArray{<:Number} , f,
68
68
x:: AbstractArray{<:Number} ,
69
69
cache:: DerivativeCache{T1,T2,fdtype,returntype} )
70
70
```
71
71
72
72
### Allocating and Non-Allocating Constructor
73
73
74
74
``` julia
75
- DerivativeCache (
75
+ DiffEqDiffTools . DerivativeCache (
76
76
x :: AbstractArray{<:Number} ,
77
77
fx :: Union{Nothing,AbstractArray{<:Number}} = nothing ,
78
78
epsilon :: Union{Nothing,AbstractArray{<:Real}} = nothing ,
@@ -90,23 +90,23 @@ This allocates either `fx` or `epsilon` if these are nothing and they are needed
90
90
91
91
``` julia
92
92
# 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 },
94
94
returntype:: Type{T2} = eltype (x),
95
95
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 },
97
97
returntype:: Type{T2} = eltype (df),
98
98
inplace:: Type{Val{T3}} = Val{true })
99
99
100
100
# Cached
101
- finite_difference_gradient! (df:: AbstractArray{<:Number} , f,
101
+ DiffEqDiffTools . finite_difference_gradient! (df:: AbstractArray{<:Number} , f,
102
102
x:: AbstractArray{<:Number} ,
103
103
cache:: GradientCache )
104
104
```
105
105
106
106
### Allocating Cache Constructor
107
107
108
108
``` julia
109
- GradientCache (
109
+ DiffEqDiffTools . GradientCache (
110
110
df :: Union{<:Number,AbstractArray{<:Number}} ,
111
111
x :: Union{<:Number, AbstractArray{<:Number}} ,
112
112
fdtype :: Type{T1} = Val{:central },
@@ -117,7 +117,7 @@ GradientCache(
117
117
### Non-Allocating Cache Constructor
118
118
119
119
``` julia
120
- GradientCache (
120
+ DiffEqDiffTools . GradientCache (
121
121
c1 :: Union{Nothing,AbstractArray{<:Number}} ,
122
122
c2 :: Union{Nothing,AbstractArray{<:Number}} ,
123
123
fx :: Union{Nothing,<:Number,AbstractArray{<:Number}} = nothing ,
@@ -129,7 +129,7 @@ GradientCache(
129
129
Note that here ` fx ` is a cached function call of ` f ` . If you provide ` fx ` , then
130
130
` fx ` will be used in the forward differencing method to skip a function call.
131
131
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
133
133
cache array for the output of ` fx ` already being used, you can make it alias
134
134
into the differencing algorithm here.
135
135
@@ -139,21 +139,21 @@ into the differencing algorithm here.
139
139
140
140
``` julia
141
141
# Cache-less
142
- finite_difference_jacobian (f, x:: AbstractArray{<:Number} ,
142
+ DiffEqDiffTools . finite_difference_jacobian (f, x:: AbstractArray{<:Number} ,
143
143
fdtype :: Type{T1} = Val{:central },
144
144
returntype :: Type{T2} = eltype (x),
145
145
inplace :: Type{Val{T3}} = Val{true })
146
146
147
147
# 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,
150
150
x:: AbstractArray{<:Number} ,cache:: JacobianCache )
151
151
```
152
152
153
153
### Allocating Cache Constructor
154
154
155
155
``` julia
156
- JacobianCache (
156
+ DiffEqDiffTools . JacobianCache (
157
157
x,
158
158
fdtype :: Type{T1} = Val{:central },
159
159
returntype :: Type{T2} = eltype (x),
@@ -165,7 +165,7 @@ This assumes the Jacobian is square.
165
165
### Non-Allocating Cache Constructor
166
166
167
167
``` julia
168
- JacobianCache (
168
+ DiffEqDiffTools . JacobianCache (
169
169
x1 ,
170
170
fx ,
171
171
fx1,
0 commit comments