Opened 14 months ago
Closed 10 months ago
#29196 closed enhancement (fixed)
Make Ehrhart series related function cached
Reported by:  jipilab  Owned by:  

Priority:  major  Milestone:  sage9.2 
Component:  geometry  Keywords:  ehrhart, h star vector 
Cc:  selia, ghkliem  Merged in:  
Authors:  JeanPhilippe Labbé, Jonathan Kliem  Reviewers:  Matthias Koeppe 
Report Upstream:  N/A  Work issues:  
Branch:  b397c07 (Commits, GitHub, GitLab)  Commit:  b397c07108566c042aa2932ce12b6e58f79e109a 
Dependencies:  Stopgaps: 
Description
Currently, the construction for ehrhart_series
and other related methods in backend_normaliz
are not cached, which means that they need to be recreated every time they are called.
These functions should be cached.
Change History (20)
comment:1 Changed 12 months ago by
 Milestone changed from sage9.1 to sage9.2
comment:2 Changed 11 months ago by
 Branch set to public/29196
 Cc ghkliem added
 Commit set to 0a45ea8aab5d414faacf71500ea27df1d37c9a8f
 Keywords ehrhart h star vector added
 Status changed from new to needs_review
comment:3 Changed 11 months ago by
 Status changed from needs_review to needs_work
comment:4 Changed 11 months ago by
 Work issues set to Failing doctests, hilbert series is not hashable
This is the first try. The tests are not passing. It needs some fixing.
comment:5 Changed 11 months ago by
 Commit changed from 0a45ea8aab5d414faacf71500ea27df1d37c9a8f to b894494ff997620b704ad582558b3b385b253b4b
Branch pushed to git repo; I updated commit sha1. New commits:
b894494  make hilbert series arguments cachable

comment:6 Changed 11 months ago by
According to the documentation http://doc.sagemath.org/html/en/reference/misc/sage/misc/cachefunc.html, this should do it.
comment:7 Changed 10 months ago by
 Branch changed from public/29196 to public/29196reb
 Commit changed from b894494ff997620b704ad582558b3b385b253b4b to 3ba66bd374dcfad3ba6214acfdd1df0b31322819
 Status changed from needs_work to needs_review
comment:8 Changed 10 months ago by
 Commit changed from 3ba66bd374dcfad3ba6214acfdd1df0b31322819 to 6fa511dd53a95ba271f2a71b07214db8e8caddcb
Branch pushed to git repo; I updated commit sha1. New commits:
6fa511d  use anonymous function for simplification

comment:9 Changed 10 months ago by
 Branch changed from public/29196reb to public/29196reb2
 Commit changed from 6fa511dd53a95ba271f2a71b07214db8e8caddcb to 721a1e714bfc2bf4ab540cc3abf7f9560afc6178
comment:10 Changed 10 months ago by
Are the "work issues" resolved?
comment:11 Changed 10 months ago by
 Work issues Failing doctests, hilbert series is not hashable deleted
Obviously :) We have a green bot.
comment:12 Changed 10 months ago by
Well, ok, that doesn't mean anything if the bot doesn't have normaliz, which appears to be the case.
But I claim they are resolved anyway.
comment:13 Changed 10 months ago by
 Reviewers set to Matthias Koeppe
 Status changed from needs_review to positive_review
comment:14 Changed 10 months ago by
Thank you.
comment:15 Changed 10 months ago by
 Status changed from positive_review to needs_work
If latte_int is installed:
File "src/sage/geometry/polyhedron/base_QQ.py", line 547, in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.? Failed example: Q.ehrhart_quasipolynomial.is_in_cache() # optional  latte_int Expected: True Got: False ********************************************************************** 1 item had failures: 1 of 67 in sage.geometry.polyhedron.base_QQ.Polyhedron_QQ.? [76 tests, 1 failure, 0.56 s]
comment:16 Changed 10 months ago by
 Commit changed from 721a1e714bfc2bf4ab540cc3abf7f9560afc6178 to b397c07108566c042aa2932ce12b6e58f79e109a
Branch pushed to git repo; I updated commit sha1. New commits:
b397c07  fix doctest

comment:17 Changed 10 months ago by
 Status changed from needs_work to needs_review
Sorry, I missed that. Didn't have latte_int
installed on my laptop. You need to give is_in_cache
the same arguments of course.
comment:18 Changed 10 months ago by
 Status changed from needs_review to positive_review
comment:19 Changed 10 months ago by
Thank you.
comment:20 Changed 10 months ago by
 Branch changed from public/29196reb2 to b397c07108566c042aa2932ce12b6e58f79e109a
 Resolution set to fixed
 Status changed from positive_review to closed
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date.