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 force-pushed the schillic/linear_map branch from 8033589 to 801ab03 Compare July 29, 2023 20:10
@schillic schillic marked this pull request as ready for review July 29, 2023 21:01
@schillic schillic force-pushed the schillic/linear_map branch from 801ab03 to 2c72086 Compare August 12, 2023 07:24
@schillic schillic merged commit c1a1b1d into master Aug 18, 2023
@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.

2 participants