|
81 | 81 |
|
82 | 82 | """ |
83 | 83 | FiniteDiff.JacobianCache( |
84 | | - x1 , |
85 | | - fx , |
| 84 | + x1, |
| 85 | + fx, |
86 | 86 | fx1, |
87 | 87 | fdtype :: Type{T1} = Val{:central}, |
88 | | - returntype :: Type{T2} = eltype(fx), |
| 88 | + returntype :: Type{T2} = eltype(fx); |
89 | 89 | colorvec = 1:length(x1), |
90 | 90 | sparsity = nothing) |
91 | 91 |
|
@@ -189,16 +189,16 @@ end |
189 | 189 | """ |
190 | 190 | FiniteDiff.finite_difference_jacobian( |
191 | 191 | f, |
192 | | - x::AbstractArray{<:Number}, |
193 | | - fdtype::Type{T1}=Val{:forward}, |
194 | | - returntype::Type{T2}=eltype(x), |
195 | | - f_in=nothing; |
196 | | - relstep=default_relstep(fdtype, eltype(x)), |
197 | | - absstep=relstep, |
198 | | - colorvec=1:length(x), |
199 | | - sparsity=nothing, |
200 | | - jac_prototype=nothing, |
201 | | - dir=true) |
| 192 | + x :: AbstractArray{<:Number}, |
| 193 | + fdtype :: Type{T1} = Val{:forward}, |
| 194 | + returntype :: Type{T2} = eltype(x), |
| 195 | + f_in = nothing; |
| 196 | + relstep = default_relstep(fdtype, eltype(x)), |
| 197 | + absstep = relstep, |
| 198 | + colorvec = 1:length(x), |
| 199 | + sparsity = nothing, |
| 200 | + jac_prototype = nothing, |
| 201 | + dir = true) |
202 | 202 |
|
203 | 203 | Compute the Jacobian matrix of function `f` at point `x` using finite differences. |
204 | 204 |
|
@@ -265,12 +265,12 @@ void_setindex!(args...) = (setindex!(args...); return) |
265 | 265 | f, |
266 | 266 | x, |
267 | 267 | cache::JacobianCache; |
268 | | - relstep=default_relstep(fdtype, eltype(x)), |
269 | | - absstep=relstep, |
270 | | - colorvec = cache.colorvec, |
271 | | - sparsity = cache.sparsity, |
| 268 | + relstep = default_relstep(fdtype, eltype(x)), |
| 269 | + absstep = relstep, |
| 270 | + colorvec = cache.colorvec, |
| 271 | + sparsity = cache.sparsity, |
272 | 272 | jac_prototype = nothing, |
273 | | - dir=true) |
| 273 | + dir = true) |
274 | 274 |
|
275 | 275 | Cached. |
276 | 276 | """ |
@@ -421,14 +421,14 @@ end |
421 | 421 |
|
422 | 422 | """ |
423 | 423 | finite_difference_jacobian!( |
424 | | - J::AbstractMatrix, |
| 424 | + J :: AbstractMatrix, |
425 | 425 | f, |
426 | | - x::AbstractArray{<:Number}, |
427 | | - fdtype :: Type{T1}=Val{:forward}, |
428 | | - returntype :: Type{T2}=eltype(x), |
| 426 | + x :: AbstractArray{<:Number}, |
| 427 | + fdtype :: Type{T1} = Val{:forward}, |
| 428 | + returntype :: Type{T2} = eltype(x), |
429 | 429 | f_in :: Union{T2,Nothing}=nothing; |
430 | | - relstep=default_relstep(fdtype, eltype(x)), |
431 | | - absstep=relstep, |
| 430 | + relstep = default_relstep(fdtype, eltype(x)), |
| 431 | + absstep = relstep, |
432 | 432 | colorvec = 1:length(x), |
433 | 433 | sparsity = ArrayInterfaceCore.has_sparsestruct(J) ? J : nothing) |
434 | 434 |
|
@@ -480,15 +480,15 @@ end |
480 | 480 |
|
481 | 481 | """ |
482 | 482 | FiniteDiff.finite_difference_jacobian!( |
483 | | - J::AbstractMatrix{<:Number}, |
| 483 | + J :: AbstractMatrix{<:Number}, |
484 | 484 | f, |
485 | | - x::AbstractArray{<:Number}, |
486 | | - cache::JacobianCache; |
487 | | - relstep=default_relstep(fdtype, eltype(x)), |
488 | | - absstep=relstep, |
| 485 | + x :: AbstractArray{<:Number}, |
| 486 | + cache :: JacobianCache; |
| 487 | + relstep = default_relstep(fdtype, eltype(x)), |
| 488 | + absstep = relstep, |
489 | 489 | colorvec = cache.colorvec, |
490 | 490 | sparsity = cache.sparsity, |
491 | | - dir=true) |
| 491 | + dir = true) |
492 | 492 |
|
493 | 493 | Cached. |
494 | 494 | """ |
|
0 commit comments