Skip to content

Commit 429c2b2

Browse files
committed
Add support for Jacobian-vector products
1 parent 7c56890 commit 429c2b2

File tree

11 files changed

+802
-271
lines changed

11 files changed

+802
-271
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ NLSolversBase.jl is the core, common dependency of several packages in the [Juli
1919
The package aims at establishing common ground for [Optim.jl](https://github.com/JuliaNLSolvers/Optim.jl), [LineSearches.jl](https://github.com/JuliaNLSolvers/LineSearches.jl), and [NLsolve.jl](https://github.com/JuliaNLSolvers/NLsolve.jl). The common ground is mainly the types used to hold objective related callables, information about the objectives, and an interface to interact with these types.
2020

2121
## NDifferentiable
22-
There are currently three main types: `NonDifferentiable`, `OnceDifferentiable`, and `TwiceDifferentiable`. There's also a more experimental `TwiceDifferentiableHV` for optimization algorithms that use Hessian-vector products. An `NDifferentiable` instance can be used to hold relevant functions for
22+
There are currently three main types: `NonDifferentiable`, `OnceDifferentiable`, and `TwiceDifferentiable`. An `NDifferentiable` instance can be used to hold relevant functions for
2323

2424
- Optimization: $F : \mathbb{R}^N \to \mathbb{R}$
2525
- Solving systems of equations: $F : \mathbb{R}^N \to \mathbb{R}^N$

src/NLSolversBase.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,24 @@ export AbstractObjective,
99
NonDifferentiable,
1010
OnceDifferentiable,
1111
TwiceDifferentiable,
12-
TwiceDifferentiableHV,
1312
value,
1413
value!,
1514
value_gradient!,
15+
value_gradient_hessian!,
1616
value_jacobian!,
17+
value_jvp!,
1718
gradient,
1819
gradient!,
20+
gradient_hessian!,
1921
jacobian,
2022
jacobian!,
23+
jvp!,
2124
hessian,
2225
hessian!,
2326
value!!,
2427
value_gradient!!,
2528
value_jacobian!!,
2629
hessian!!,
27-
hv_product,
2830
hv_product!,
2931
only_fg!,
3032
only_fgh!,
@@ -38,6 +40,7 @@ export AbstractObjective,
3840
clear!,
3941
f_calls,
4042
g_calls,
43+
jvp_calls,
4144
h_calls,
4245
hv_calls
4346

@@ -51,12 +54,11 @@ include("objective_types/abstract.jl")
5154
include("objective_types/nondifferentiable.jl")
5255
include("objective_types/oncedifferentiable.jl")
5356
include("objective_types/twicedifferentiable.jl")
54-
include("objective_types/twicedifferentiablehv.jl")
5557
include("objective_types/incomplete.jl")
5658
include("objective_types/constraints.jl")
5759
include("interface.jl")
5860

5961
NonDifferentiable(f::OnceDifferentiable, x::AbstractArray) = NonDifferentiable(f.f, x, copy(f.F))
6062
NonDifferentiable(f::TwiceDifferentiable, x::AbstractArray) = NonDifferentiable(f.f, x, copy(f.F))
61-
NonDifferentiable(f::TwiceDifferentiableHV, x::AbstractArray) = NonDifferentiable(f.f, x, copy(f.F))
63+
6264
end # module

0 commit comments

Comments
 (0)