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

Better linear_map of AbstractZonotope for 1D output #3364

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

schillic
Copy link
Member

@schillic schillic commented Jul 29, 2023

If the output dimension is 1, we may still want to return a Zonotope for type stability. But the result can have just one generator.

julia> @time linear_map(M, Z)  # master
  0.000015 seconds (3 allocations: 176 bytes)
Zonotope{Float64, Vector{Float64}, Matrix{Float64}}([0.6565135067379049], [0.06137160508809101 -1.0290195455026827 -0.29127884051790404])

julia> @time linear_map(M, Z)  # this branch
  0.000011 seconds (3 allocations: 160 bytes)
Zonotope{Float64, Vector{Float64}, Matrix{Float64}}([0.6565135067379049], [-1.2589267809324955;;])

@schillic schillic marked this pull request as ready for review July 29, 2023 21:01
@schillic schillic merged commit c1a1b1d into master Aug 18, 2023
6 checks passed
@schillic schillic deleted the schillic/linear_map branch August 18, 2023 21:10
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.

None yet

2 participants