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

polytopes.snub_cube should allow exact coordinates #26340

Closed
mkoeppe opened this issue Sep 22, 2018 · 30 comments
Closed

polytopes.snub_cube should allow exact coordinates #26340

mkoeppe opened this issue Sep 22, 2018 · 30 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 22, 2018

polytopes.snub_cube should allow to have vertices with exact coordinates.

In preparation for #25097, the method has the new optional parameters verbose, base_ring, and exact.

CC: @nvcleemp @jplab @LaisRast

Component: geometry

Keywords: snub_cube, polytopes

Author: Laith Rastanawi, Matthias Koeppe

Branch/Commit: 13d8c44

Reviewer: Vincent Delecroix, Jean-Philippe Labbé, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/26340

@mkoeppe mkoeppe added this to the sage-8.4 milestone Sep 22, 2018
@LaisRast
Copy link

Changed keywords from none to snub_cube, polytopes

@LaisRast
Copy link

Commit: 57a9d10

@LaisRast
Copy link

Branch: public/26340

@LaisRast
Copy link

New commits:

57a9d10add exact option to snub_cube

@LaisRast
Copy link

Author: Laith Rastanawi

@videlec
Copy link
Contributor

videlec commented Apr 18, 2019

Reviewer: vincent Delecroix

@videlec
Copy link
Contributor

videlec commented Apr 18, 2019

comment:4
sage -t --long src/doc/en/thematic_tutorials/geometry/polyhedra_tutorial.rst
**********************************************************************
File "src/doc/en/thematic_tutorials/geometry/polyhedra_tutorial.rst", line 770, in doc.en.thematic_tutorials.geometry.polyhedra_tutorial
Failed example:
    E = polytopes.snub_cube(); E
Expected:
    A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 24 vertices
Got:
    A 3-dimensional polyhedron in (Number Field in z with defining polynomial x^3 + x^2 + x - 1)^3 defined as the convex hull of 24 vertices
**********************************************************************
1 item had failures:
   1 of 109 in doc.en.thematic_tutorials.geometry.polyhedra_tutorial
    [108 tests, 1 failure, 57.00 s]
----------------------------------------------------------------------
sage -t --long src/doc/en/thematic_tutorials/geometry/polyhedra_tutorial.rst  # 1 doctest failed
----------------------------------------------------------------------

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2019

Changed commit from 57a9d10 to 8703f7f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2019

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

8703f7ffix snub cube example in polyhedra_tutorial.rst

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 23, 2019

comment:8

Fails its testsuite on Python 2.
Can't use 1/2 in the construction; it gives the float 0.5 (in the Python module, which uses from future import division)

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 23, 2019

comment:9

(On branch public/25097/qnormaliz-algebraic I also have an improvement of the snub cube construction, which handles the backend parameter. Perhaps the code should be combined.)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2019

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

05867b4Merge tag '8.8.beta3' into t/26340/public/26340

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2019

Changed commit from 8703f7f to 05867b4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2019

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

39c3c67Fix construction of snub_cube data

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 24, 2019

Changed commit from 05867b4 to 39c3c67

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 24, 2019

Changed reviewer from vincent Delecroix to Vincent Delecroix

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 24, 2019

Changed author from Laith Rastanawi to Laith Rastanawi, Matthias Koeppe

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title polytopes.snub_cube should be set up with base_ring=QQ polytopes.snub_cube should be set up in exact arithmetic Apr 24, 2019
@tscrim
Copy link
Collaborator

tscrim commented Apr 25, 2019

comment:13

Considering how long it takes to construct the polytope with exact=True, I think default should still be exact=False. However, I do like that the exact option is there for those who want it.

@jplab
Copy link

jplab commented Apr 25, 2019

comment:14

Replying to @tscrim:

Considering how long it takes to construct the polytope with exact=True, I think default should still be exact=False. However, I do like that the exact option is there for those who want it.

The normaliz backend will soon accept number fields as base ring and this computation will take much less time, see #25097.

Once it is possible, I suggest to specify the backend normaliz with exact=True in the test...

@tscrim
Copy link
Collaborator

tscrim commented Apr 25, 2019

comment:15

Replying to @jplab:

Replying to @tscrim:

Considering how long it takes to construct the polytope with exact=True, I think default should still be exact=False. However, I do like that the exact option is there for those who want it.

The normaliz backend will soon accept number fields as base ring and this computation will take much less time, see #25097.

Once it is possible, I suggest to specify the backend normaliz with exact=True in the test...

I agree with this overall, but I would say you should have all 3 tests (exact=False, exact=True with # long time, and exact=True with # optional - normaliz) for good coverage.

Once #25097, you could have exact=None, which checks if normaliz is installed and does the exact if it is and the inexact if not. However, for now, I would again suggest staying with exact=False as the default.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 25, 2019

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

e70d4a5snub_cube: Change default back to exact=False

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 25, 2019

Changed commit from 39c3c67 to e70d4a5

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 25, 2019

comment:17

I agree with Travis and have changed it back to default exact=False.

Replying to @tscrim:

I agree with this overall, but I would say you should have all 3 tests (exact=False, exact=True with # long time, and exact=True with # optional - normaliz) for good coverage.

Yes, on #25097 we already have all 3 tests.

@jplab
Copy link

jplab commented Apr 25, 2019

Changed reviewer from Vincent Delecroix to Vincent Delecroix, Jean-Philippe Labbé, Travis Scrimshaw

@jplab

This comment has been minimized.

@jplab
Copy link

jplab commented Apr 25, 2019

comment:18

Apart from the annoying convention in line

- - ``exact`` - (boolean, default ``False``) if ``True`` use exact
+ - ``exact`` -- (boolean, default ``False``) if ``True`` use exact

it looks good to go to me. If you fix this, you can set it to positive review on my behalf.

@jplab jplab changed the title polytopes.snub_cube should be set up in exact arithmetic polytopes.snub_cube should allow exact coordinates Apr 25, 2019
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 25, 2019

Changed commit from e70d4a5 to 13d8c44

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 25, 2019

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

13d8c44docstring fix

@vbraun
Copy link
Member

vbraun commented Apr 29, 2019

Changed branch from public/26340 to 13d8c44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants