Skip to content

Commit

Permalink
removed redundant function
Browse files Browse the repository at this point in the history
  • Loading branch information
kpotomkin committed Jun 5, 2019
1 parent 6b62873 commit 5f033d7
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/Approximations/decompositions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -582,28 +582,3 @@ function project(P::HPolyhedron{N}, block::AbstractVector{Int}) where {N}
"for a general block structure is not implemented yet")
end
end

"""
function project(S::LazySet{N},
block::AbstractVector{Int},
set_type::Type{<:LinearMap},
n::Int=dim(S),
ε::Real=Inf)::LinearMap
Project a high-dimensional set to a low-dimensional set by a lazy linear map.
### Input
- `S` -- set
- `block` -- block structure - a vector with the dimensions of interest
- `set_type` -- `Hyperrectangle` - used for dispatch
- `n` -- (optional, default: `dim(S)`) ambient dimension of the set `S`
- `ε` -- (optional, default: `Inf`) - used for dispatch, ignored
### Output
A lazy `LinearMap` representing a projection of the high-dimensional set to a low-dimensional.
"""
@inline function project(S::LazySet{N},
block::AbstractVector{Int},
set_type::Type{<:LinearMap},
n::Int=dim(S),
ε::Real=Inf)::LinearMap where {N<:Real}
M = sparse(1:length(block), block, ones(N, length(block)), length(block), n)
return M * S
end

0 comments on commit 5f033d7

Please sign in to comment.