Skip to content

Commit

Permalink
Update the ProximalProblem to also cover single function proxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellertuer committed Sep 3, 2024
1 parent 39c10e3 commit fe06c6b
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/plans/proximal_plan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,31 @@
@doc """
ManifoldProximalMapObjective{E<:AbstractEvaluationType, TC, TP, V <: Vector{<:Integer}} <: AbstractManifoldCostObjective{E, TC}
specify a problem for solvers based on the evaluation of proximal maps.
specify a problem for solvers based on the evaluation of proximal maps,
which represents proximal maps ``$(_tex(:prox))_{λf_i}`` for summands ``f = f_1 + f_2+ … + f_N`` of the cost function ``f``.
# Fields
* `cost`: a function ``F:$(_tex(:Cal, "M"))→ℝ`` to
* `cost`: a function ``f:$(_tex(:Cal, "M"))→ℝ`` to
minimize
* `proxes`: proximal maps ``$(_tex(:prox))_{λφ}:$(_tex(:Cal, "M"))$(_tex(:Cal, "M"))``
as functions `(M, λ, p) -> q`.
* `proxes`: proximal maps ``$(_tex(:prox))_{λf_i}:$(_tex(:Cal, "M"))$(_tex(:Cal, "M"))``
as functions `(M, λ, p) -> q` or in-place `(M, q, λ, p)`.
* `number_of_proxes`: number of proximal maps per function,
to specify when one of the maps is a combined one such that the proximal maps
functions return more than one entry per function, you have to adapt this value.
if not specified, it is set to one prox per function.
# Constructor
ManifoldProximalMapObjective(cost, proxes, numer_of_proxes=onex(length(proxes));
ManifoldProximalMapObjective(f, proxes_f::Union{Tuple,AbstractVector}, numer_of_proxes=onex(length(proxes));
evaluation=Allocating)
Generate a proximal problem with a tuple or vector of funtions, where by default every function computes a single prox
of one component of ``f``.
ManifoldProximalMapObjective(f, prox_f); evaluation=Allocating)
Generate a proximal objective for ``f`` and its proxial map ``$(_tex(:prox))_{λf}``
# See also
Expand Down Expand Up @@ -60,6 +67,12 @@ mutable struct ManifoldProximalMapObjective{E<:AbstractEvaluationType,TC,TP,V} <
new{E,F,typeof(proxes_f),typeof(nOP)}(f, proxes_f, nOP)
end
end
function ManifoldProximalMapObjective(
f::F, prox_f::PF; evaluation::E=AllocatingEvaluation()
) where {E<:AbstractEvaluationType,F,PF}
i = 1
return new{E,F,PF,typeof(i)}(f, prox_f, i)
end
end
function check_prox_number(n, i)
(i > n) && throw(ErrorException("the $(i)th entry does not exists, only $n available."))
Expand Down

0 comments on commit fe06c6b

Please sign in to comment.