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

Fix zero-dimensional cone in cones in PolyhedralGeometry #4336

Merged
merged 6 commits into from
Nov 21, 2024

Conversation

paemurru
Copy link
Contributor

By Definition 1.2.1 in [CLS11](@cite), the set {0} is a cone.
The function cones(X, 0) now returns an iterator that returns the zero-dimensional cone, provided the lineality space has length zero, fixing a bug.
If n is negative, then cones(X, n) now returns an empty iterator, fixing the type instability.

Copy link
Member

@benlorenz benlorenz left a comment

Choose a reason for hiding this comment

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

Thanks, indeed returning nothing seems wrong in that case. I have added a few suggestions for improvements.

src/PolyhedralGeometry/PolyhedralFan/properties.jl Outdated Show resolved Hide resolved
src/PolyhedralGeometry/PolyhedralFan/properties.jl Outdated Show resolved Hide resolved
src/PolyhedralGeometry/PolyhedralFan/properties.jl Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (aa41156) to head (53ad859).
Report is 8 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4336   +/-   ##
=======================================
  Coverage   84.50%   84.50%           
=======================================
  Files         644      645    +1     
  Lines       85606    85624   +18     
=======================================
+ Hits        72339    72357   +18     
  Misses      13267    13267           
Files with missing lines Coverage Δ
src/PolyhedralGeometry/PolyhedralFan/properties.jl 98.41% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@lgoettgens lgoettgens added the topic: polyhedral geometry Issue concerns polyhedral geometry code label Nov 21, 2024
@lkastner lkastner merged commit de39b82 into oscar-system:master Nov 21, 2024
30 checks passed
@paemurru paemurru deleted the ep/fix_empty_cones branch November 21, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: polyhedral geometry Issue concerns polyhedral geometry code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants