From bbb1adccf9b16783a9b61c85788fc16413324afe Mon Sep 17 00:00:00 2001 From: schillic Date: Fri, 5 Oct 2018 21:34:34 +0200 Subject: [PATCH] support function for LinearMap --- src/LinearMap.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/LinearMap.jl b/src/LinearMap.jl index 0b2bfbabde..881d3ac9ac 100644 --- a/src/LinearMap.jl +++ b/src/LinearMap.jl @@ -171,6 +171,30 @@ function σ(d::AbstractVector{N}, lm::LinearMap{N}) where {N<:Real} return lm.M * σ(_At_mul_B(lm.M, d), lm.X) end +""" + ρ(d::AbstractVector{N}, lm::LinearMap{N}) where {N<:Real} + +Return the support function of the linear map. + +### Input + +- `d` -- direction +- `lm` -- linear map + +### Output + +The support function in the given direction. +If the direction has norm zero, the result depends on the wrapped set. + +### Notes + +If ``L = M⋅S``, where ``M`` is a matrix and ``S`` is a convex set, it follows +that ``ρ(d, L) = ρ(M^T d, S)`` for any direction ``d``. +""" +function ρ(d::AbstractVector{N}, lm::LinearMap{N}) where {N<:Real} + return ρ(_At_mul_B(lm.M, d), lm.X) +end + """ ∈(x::AbstractVector{N}, lm::LinearMap{N})::Bool where {N<:Real}