2
2
function finite_difference_jacobian (f, x:: AbstractArray{<:Number} ,
3
3
fdtype:: DataType = Val{:central }, funtype:: DataType = Val{:Real },
4
4
wrappertype:: DataType = Val{:Default },
5
- fx:: Union{Void,AbstractArray{<:Number}} = nothing , epsilon:: Union{Void,AbstractArray{<:Real}} = nothing , returntype= eltype (x),
5
+ fx:: Union{Void,AbstractArray{<:Number}} = nothing ,
6
+ epsilon:: Union{Void,AbstractArray{<:Number}} = nothing , returntype= eltype (x),
6
7
inplace:: DataType = Val{true })
7
-
8
8
J = zeros (returntype, length (x), length (x))
9
9
finite_difference_jacobian! (J, f, x, fdtype, funtype, wrappertype, fx,
10
- epsilon, returntype,inplace)
10
+ epsilon, returntype, inplace)
11
11
end
12
12
13
13
function finite_difference_jacobian! (J:: AbstractMatrix{<:Number} , f,
@@ -18,14 +18,14 @@ function finite_difference_jacobian!(J::AbstractMatrix{<:Number}, f,
18
18
epsilon:: Union{Void,AbstractArray{<:Number}} = nothing , returntype= eltype (x),
19
19
inplace:: DataType = Val{true })
20
20
21
- finite_difference_jacobian ! (J, f, x, fdtype, funtype, wrappertype, fx,
21
+ _finite_difference_jacobian ! (J, f, x, fdtype, funtype, wrappertype, fx,
22
22
epsilon, returntype, inplace)
23
23
end
24
24
25
- function finite_difference_jacobian ! (J:: AbstractMatrix{<:Real} , f,
25
+ function _finite_difference_jacobian ! (J:: AbstractMatrix{<:Real} , f,
26
26
x:: AbstractArray{<:Real} ,
27
27
fdtype:: DataType , :: Type{Val{:Real}} , :: Type{Val{:Default}} ,
28
- fx, epsilon, returntype= eltype (x) , inplace:: Type{Val{true}} )
28
+ fx, epsilon, returntype, inplace:: Type{Val{true}} )
29
29
30
30
# TODO : test and rework this to support GPUArrays and non-indexable types, if possible
31
31
m, n = size (J)
@@ -68,7 +68,7 @@ function finite_difference_jacobian!(J::AbstractMatrix{<:Real}, f,
68
68
J
69
69
end
70
70
71
- function finite_difference_jacobian ! (J:: AbstractMatrix{<:Number} , f,
71
+ function _finite_difference_jacobian ! (J:: AbstractMatrix{<:Number} , f,
72
72
x:: AbstractArray{<:Number} ,
73
73
fdtype:: DataType , :: Type{Val{:Complex}} , :: Type{Val{:Default}} ,
74
74
fx, epsilon, returntype, inplace:: Type{Val{true}} )
0 commit comments