Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#715 - Support function for LinearMap #716

Merged
merged 1 commit into from
Oct 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/LinearMap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down