Opened 7 years ago

Closed 7 years ago

#18696 closed enhancement (fixed)

Add lineality() method for convex cones

Reported by: Michael Orlitzky Owned by:
Priority: major Milestone: sage-6.8
Component: geometry Keywords:
Cc: Merged in:
Authors: Michael Orlitzky Reviewers: Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: d3eb1c9 (Commits, GitHub, GitLab) Commit: d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3
Dependencies: #18454 Stopgaps:

Status badges

Description

The lineality of a cone is defined as the dimension of the largest linear subspace contained in the cone. It's related to strict-convexity 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 7 years ago by Michael Orlitzky

Authors: Michael Orlitzky
Branch: u/mjo/ticket/18696
Commit: 227228f6625e590c5432b97244a1f838af558070
Status: newneeds_review

Last 10 new commits:

058e4abTrac #18454: Remove the 2*dim restriction on rays in random_cone().
f6faa2bTrac #18454: Allow random_cone() to be (non-)strictly-convex.
f8e1eb0Trac #18454: Remove an unnecessary exception in random_cone().
52c148aTrac #18454: Set max_dim on a random_cone() test that could run forever.
63f92c4Trac #18454: Add a "solid" parameter to random_cone().
cb7cd15Trac #18454: Fix warning block formatting in random_cone().
b86adc1Trac #18454: Catch another infinite loop condition.
3d2151bTrac #18454: Call set_random_seed() before all random doctests.
1683fd8Trac #18454: Speed up random_cone() doctests.
227228fTrac #18696: Add lineality() method for convex cones.

comment:2 Changed 7 years ago by Michael Orlitzky

Dependencies: 18454#18454

comment:3 Changed 7 years ago by git

Commit: 227228f6625e590c5432b97244a1f838af558070473de255241018a69b5aa73cc9daf4a26bbde927

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

de59dd1Trac #18454: Remove the 2*dim restriction on rays in random_cone().
deeb2ecTrac #18454: Allow random_cone() to be (non-)strictly-convex.
44ac645Trac #18454: Remove an unnecessary exception in random_cone().
909997aTrac #18454: Set max_dim on a random_cone() test that could run forever.
bd24822Trac #18454: Add a "solid" parameter to random_cone().
ba66027Trac #18454: Fix warning block formatting in random_cone().
8b2ff99Trac #18454: Catch another infinite loop condition.
78c206fTrac #18454: Call set_random_seed() before all random doctests.
7bdaf1cTrac #18454: Speed up random_cone() doctests.
473de25Trac #18696: Add lineality() method for convex cones.

comment:4 Changed 7 years ago by git

Commit: 473de255241018a69b5aa73cc9daf4a26bbde9273e9fd77cd13848055db5bb17ecb0f1ad5f070d2f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

52a1e4bTrac #18454: Rename min/max_dim to min/max_ambient_dim in random_cone().
a0235dcTrac #18454: Fix two confusing random_cone() examples.
5b1eccbTrac #18454: Remove some excessive doctests for random_cone().
5bf86a6Trac #18454: Clean up long random_cone() tests.
3e9fd77Trac #18696: Add lineality() method for convex cones.

comment:5 Changed 7 years ago by git

Commit: 3e9fd77cd13848055db5bb17ecb0f1ad5f070d2fed422e3d3eaed45d146398ffffc640ab4fe1abe7

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e6e7a80Merge branch 't/18613/errors_with_is_isomorphic___for_trivial_cones' into t/18454/ticket/18454
a07efa9Reviewer's tweaks to random cones.
8c962e1Trac #18454: Remove more redundant (long) tests.
ed422e3Trac #18696: Add lineality() method for convex cones.

comment:6 Changed 7 years ago by Andrey Novoseltsev

Reviewers: 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 than
    sage: (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/pep-0008/#blank-lines
  • 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 7 years ago by git

Commit: ed422e3d3eaed45d146398ffffc640ab4fe1abe7d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3

Branch pushed to git repo; I updated commit sha1. New commits:

d3eb1c9Trac #18696: Fix reviewer's suggestions.

comment:8 Changed 7 years ago by Andrey Novoseltsev

Status: needs_reviewpositive_review

comment:9 Changed 7 years ago by Volker Braun

Branch: u/mjo/ticket/18696d3eb1c912153d8c0b6f4175320d8ee4b1e6bafb3
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.