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

Conversion of polyhedral set to star set #2645

Closed
mforets opened this issue Apr 5, 2021 · 0 comments · Fixed by #2652
Closed

Conversion of polyhedral set to star set #2645

mforets opened this issue Apr 5, 2021 · 0 comments · Fixed by #2652
Assignees

Comments

@mforets
Copy link
Member

mforets commented Apr 5, 2021

Should be

function Base.convert(::Type{LazySets.STAR}, P::AbstractPolyhedron{N}) where {N}
    n = dim(P)
    c = zeros(N, n)
    V = Matrix(one(N)*I, n, n)
    return Star(c, V, P)
end

S = convert(LazySets.STAR, rand(HPolygon))

@show typeof(S)
@show basis(S)
@show center(S)

typeof(S) = AffineMap{Float64, HPolygon{Float64, Vector{Float64}}, Float64, Matrix{Float64}, Vector{Float64}}

basis(S) = [1.0 0.0; 0.0 1.0]

center(S) = [0.0, 0.0]
mforets pushed a commit that referenced this issue Apr 12, 2021
* add conversion from polyhedral set to star set

* remove prefix and add function to docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants