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

#214 - convert from AbstractHyperrectangle to Zonotope #225

Merged
merged 1 commit into from
Feb 10, 2018

Conversation

schillic
Copy link
Member

@schillic schillic commented Feb 7, 2018

Addresses #214.

@schillic schillic requested a review from mforets February 7, 2018 19:12
src/Zonotope.jl Outdated
gens = zeros(N, n, n)
for i in 1:n
gens[i, i] = radius_hyperrectangle(H, i)
end
Copy link
Member

@mforets mforets Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.. or you can let: gens = diagm(radius_hyperrectangle(H))


# test conversion from hyperrectangular sets
convert(Zonotope, Hyperrectangle(N[2.,3.], N[4.,5.]))
convert(Zonotope, BallInf(N[5.,3.], N(2.)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add @test Z.center == N[2.,3.] and @test diag(Z.generators) == N[4.,5.]

Copy link
Member

@mforets mforets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@schillic schillic merged commit 8b4f03a into master Feb 10, 2018
@schillic schillic deleted the schillic/214 branch February 10, 2018 12:18
@schillic schillic mentioned this pull request Feb 10, 2018
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 this pull request may close these issues.

2 participants