Skip to content

Commit 8cd8013

Browse files
add store_previous_jacobian doc
1 parent 2a452ee commit 8cd8013

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/compositeNormL2.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export CompositeNormL2
33

44
@doc raw"""
5-
CompositeNormL2(λ, c!, J!, A, b)
5+
CompositeNormL2(λ, c!, J!, A, b; store_previous_jacobian::Bool = false)
66
77
Returns function `c` composed with the `ℓ₂` norm:
88
```math
@@ -22,6 +22,8 @@ such that `J` is the Jacobian of `c`. It is expected that `m ≤ n`.
2222
c!(b <: AbstractVector{Real}, xk <: AbstractVector{Real})
2323
J!(A <: AbstractSparseMatrixCOO{Real, Integer}, xk <: AbstractVector{Real})
2424
```
25+
Moreover, if you want shifted instances of the operator to store the previous Jacobian on each shift, you can specify `store_previous_jacobian = true`.
26+
This is particularly useful for quasi-Newton updates in the context of constrained optimization.
2527
"""
2628
mutable struct CompositeNormL2{
2729
T <: Real,

src/shiftedCompositeNormL2.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export ShiftedCompositeNormL2
22
@doc raw"""
3-
ShiftedCompositeNormL2(h, c!, J!, A, b)
3+
ShiftedCompositeNormL2(h, c!, J!, A, b; store_previous_jacobian::Bool = false)
44
55
Returns the shift of a function `c` composed with the `ℓ₂` norm (see CompositeNormL2.jl).
66
Here, `c` is linearized i.e, `c(x + s) ≈ c(x) + J(x)s`.
@@ -21,6 +21,9 @@ such that `J` is the Jacobian of `c`. It is expected that `m ≤ n`.
2121
c!(b <: AbstractVector{Real}, xk <: AbstractVector{Real})
2222
J!(A <: AbstractSparseMatrixCOO{Real, Integer}, xk <: AbstractVector{Real})
2323
```
24+
Moreover, if you want shifted instances of the operator to store the previous Jacobian on each shift, you can specify `store_previous_jacobian = true`.
25+
In this case, each time a shift is performed, the previous Jacobian is stored in the `A_prev` field.
26+
This is particularly useful for quasi-Newton updates in the context of constrained optimization.
2427
"""
2528
mutable struct ShiftedCompositeNormL2{
2629
T <: Real,

0 commit comments

Comments
 (0)