Skip to content

Commit

Permalink
Merge pull request #716 from JuliaReach/schillic/715
Browse files Browse the repository at this point in the history
#715 - Support function for LinearMap
  • Loading branch information
mforets authored Oct 5, 2018
2 parents 22d7ee1 + bbb1adc commit 34cc657
Showing 1 changed file with 24 additions and 0 deletions.
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

0 comments on commit 34cc657

Please sign in to comment.