#18454: New `random_cone()` function
-------------------------------------+-------------------------------------
       Reporter:  mjo                |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  geometry           |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Michael Orlitzky   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/novoselt/ticket/18454            |  a07efa959bcbd088f34e3e4b7bd0a653cfaa998d
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by novoselt):

 * commit:  5bf86a61fb7f1e41fa1c472c73789eb51c5586fd =>
     a07efa959bcbd088f34e3e4b7bd0a653cfaa998d


Comment:

 OK:
  - merged current version of #18613 to make isomorphism checks work as
 expected
  - there was a duplicate piece of code, removed
  - I tweaked some code, hopefully not unreasonably

 Regarding redundant tests I was mostly complaining about things like
 {{{
     Ensure that we can generate cones which are not strictly convex
     (can take a long time)::

         sage: set_random_seed()                         # long time
         sage: l = [ random_cone(min_ambient_dim=1,      # long time
         ....:                   max_ambient_dim=8,      # long time
         ....:                   min_rays=2,             # long time
         ....:                   max_rays=10,            # long time
         ....:                   strictly_convex=False)\
         ....:                   .is_strictly_convex()   # long time
         ....:       for i in range(0,10)]               # long time
         sage: any(l)                                    # long time
         False

     As well as ones that are strictly convex::

         sage: set_random_seed()                        # long time
         sage: l = [ random_cone(min_ambient_dim=1,     # long time
         ....:                   max_ambient_dim=8,     # long time
         ....:                   min_rays=2,            # long time
         ....:                   max_rays=10,           # long time
         ....:                   strictly_convex=True)\
         ....:                   .is_strictly_convex()  # long time
         ....:       for i in range(0,10) ]             # long time
         sage: all(l)                                   # long time
         True
 }}}
 given that above we have
 {{{
     We can also request a strictly convex cone::

         sage: set_random_seed()
         sage: K = random_cone(max_ambient_dim=8, max_rays=10,
         ....:                 strictly_convex=True)
         sage: K.is_strictly_convex()
         True

     Or one that isn't strictly convex::

         sage: set_random_seed()
         sage: K = random_cone(min_ambient_dim=5, min_rays=2,
         ....:                 strictly_convex=False)
         sage: K.is_strictly_convex()
         False
 }}}
 Since this single random tests will be repeated many times on different
 machines, I see little point in running 10 tests for longer version. But
 if you really like to keep them it is fine with me.

 The code also seems a bit over-commented to me, but if you had to have
 them there probably others can appreciate it as well. And #18613 has
 clearly demonstrated that it is a very useful addition!

 Bottom line: set to positive review if you are OK with my changes (and
 perhaps review #18613 as well?-))
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=cd6aec8491552051be48bfb278d43cf0798e8ef6
 cd6aec8]||{{{Fix isomorphism check for trivial cones.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=af4b24856cedf243cbcb515c3e42a28c06367b6c
 af4b248]||{{{Trivial cones in 2-d lattices also have isomorphism
 issues.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=c02beeea863a04328e39dd88b476ee1cfdc8fefa
 c02beee]||{{{Fix echelon_form of trivial matrices.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=deed9476f0bafa4a367cc437f3dc62e0489ba3eb
 deed947]||{{{Drop wrong pivots from the output of HNF with
 transformation.}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=e6e7a80023ea5097f4f803b8613f05e5e028723b
 e6e7a80]||{{{Merge branch
 't/18613/errors_with_is_isomorphic___for_trivial_cones' into
 t/18454/ticket/18454}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=a07efa959bcbd088f34e3e4b7bd0a653cfaa998d
 a07efa9]||{{{Reviewer's tweaks to random cones.}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/18454#comment:25>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to