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

#3419 - Fast low/high/extrema for polyhedra #3617

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

schillic
Copy link
Member

@schillic schillic commented Jul 26, 2024

Closes #3419.

julia> P = convert(HPolytope, Interval(1, 2));

julia> @time extrema(P)
  0.000274 seconds (701 allocations: 42.406 KiB)  # master
  0.000007 seconds (3 allocations: 160 bytes)
([1.0], [2.0])

julia> @time extrema(P, 1)
  0.000361 seconds (699 allocations: 42.281 KiB)  # master
  0.000004 seconds (1 allocation: 32 bytes)
(1.0, 2.0)

julia> @time low(P)
  0.000386 seconds (350 allocations: 21.188 KiB)  # master
  0.000011 seconds (1 allocation: 64 bytes)
1-element Vector{Float64}:
 1.0

julia> @time low(P, 1)
  0.000408 seconds (350 allocations: 21.141 KiB)  # master
  0.000005 seconds (1 allocation: 16 bytes)
1.0

julia> @time high(P)
  0.000322 seconds (350 allocations: 21.188 KiB)  # master
  0.000008 seconds (1 allocation: 64 bytes)
1-element Vector{Float64}:
 2.0

julia> @time high(P, 1)
  0.000214 seconds (350 allocations: 21.141 KiB)  # master
  0.000005 seconds (1 allocation: 16 bytes)
2.0

@schillic schillic force-pushed the schillic/3419 branch 4 times, most recently from 47474af to 658c6cf Compare July 26, 2024 11:10
@schillic schillic marked this pull request as ready for review July 26, 2024 11:26
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.

Faster extrema of HPolytope/HPolyhedron in 1D
1 participant