Opened 6 years ago
Closed 5 years ago
#18696 closed enhancement (fixed)
Add lineality() method for convex cones
Reported by:  mjo  Owned by:  

Priority:  major  Milestone:  sage6.8 
Component:  geometry  Keywords:  
Cc:  Merged in:  
Authors:  Michael Orlitzky  Reviewers:  Andrey Novoseltsev 
Report Upstream:  N/A  Work issues:  
Branch:  d3eb1c9 (Commits)  Commit:  d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3 
Dependencies:  #18454  Stopgaps: 
Description
The lineality of a cone is defined as the dimension of the largest linear subspace contained in the cone. It's related to strictconvexity and the dimension of (the span of (the dual of the cone)). It's easy to compute using the existing cone methods.
Change History (9)
comment:1 Changed 6 years ago by
 Branch set to u/mjo/ticket/18696
 Commit set to 227228f6625e590c5432b97244a1f838af558070
 Status changed from new to needs_review
comment:2 Changed 6 years ago by
 Dependencies changed from 18454 to #18454
comment:3 Changed 6 years ago by
 Commit changed from 227228f6625e590c5432b97244a1f838af558070 to 473de255241018a69b5aa73cc9daf4a26bbde927
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
de59dd1  Trac #18454: Remove the 2*dim restriction on rays in random_cone().

deeb2ec  Trac #18454: Allow random_cone() to be (non)strictlyconvex.

44ac645  Trac #18454: Remove an unnecessary exception in random_cone().

909997a  Trac #18454: Set max_dim on a random_cone() test that could run forever.

bd24822  Trac #18454: Add a "solid" parameter to random_cone().

ba66027  Trac #18454: Fix warning block formatting in random_cone().

8b2ff99  Trac #18454: Catch another infinite loop condition.

78c206f  Trac #18454: Call set_random_seed() before all random doctests.

7bdaf1c  Trac #18454: Speed up random_cone() doctests.

473de25  Trac #18696: Add lineality() method for convex cones.

comment:4 Changed 5 years ago by
 Commit changed from 473de255241018a69b5aa73cc9daf4a26bbde927 to 3e9fd77cd13848055db5bb17ecb0f1ad5f070d2f
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
52a1e4b  Trac #18454: Rename min/max_dim to min/max_ambient_dim in random_cone().

a0235dc  Trac #18454: Fix two confusing random_cone() examples.

5b1eccb  Trac #18454: Remove some excessive doctests for random_cone().

5bf86a6  Trac #18454: Clean up long random_cone() tests.

3e9fd77  Trac #18696: Add lineality() method for convex cones.

comment:5 Changed 5 years ago by
 Commit changed from 3e9fd77cd13848055db5bb17ecb0f1ad5f070d2f to ed422e3d3eaed45d146398ffffc640ab4fe1abe7
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
e6e7a80  Merge branch 't/18613/errors_with_is_isomorphic___for_trivial_cones' into t/18454/ticket/18454

a07efa9  Reviewer's tweaks to random cones.

8c962e1  Trac #18454: Remove more redundant (long) tests.

ed422e3  Trac #18696: Add lineality() method for convex cones.

comment:6 Changed 5 years ago by
 Reviewers set to Andrey Novoseltsev
As it is a small addition, tiny nitpicks:
 let's change "Compute" to "Return"  to me "compute ..." means that computation is performed and perhaps stored in a cache without returning anything, such methods are certainly useful especially as helpers
 you can use combined inequalities in Python:
sage: 0 <= l <= K.lattice_dim()
rather thansage: (0 <= l) and (l <= K.lattice_dim())
 PEP8 suggests only one blank line between methods and two between classes https://www.python.org/dev/peps/pep0008/#blanklines
 not sure I ever read a style guide for it, but it seems strange to me to have an empty line in the very end of a docstring ;)
comment:7 Changed 5 years ago by
 Commit changed from ed422e3d3eaed45d146398ffffc640ab4fe1abe7 to d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3
Branch pushed to git repo; I updated commit sha1. New commits:
d3eb1c9  Trac #18696: Fix reviewer's suggestions.

comment:8 Changed 5 years ago by
 Status changed from needs_review to positive_review
comment:9 Changed 5 years ago by
 Branch changed from u/mjo/ticket/18696 to d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3
 Resolution set to fixed
 Status changed from positive_review to closed
Last 10 new commits:
Trac #18454: Remove the 2*dim restriction on rays in random_cone().
Trac #18454: Allow random_cone() to be (non)strictlyconvex.
Trac #18454: Remove an unnecessary exception in random_cone().
Trac #18454: Set max_dim on a random_cone() test that could run forever.
Trac #18454: Add a "solid" parameter to random_cone().
Trac #18454: Fix warning block formatting in random_cone().
Trac #18454: Catch another infinite loop condition.
Trac #18454: Call set_random_seed() before all random doctests.
Trac #18454: Speed up random_cone() doctests.
Trac #18696: Add lineality() method for convex cones.