Opened 6 years ago
Last modified 6 years ago
#18190 new enhancement
bindings to Latte
Reported by: | vdelecroix | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.6 |
Component: | interfaces: optional | Keywords: | |
Cc: | dimpase, novoselt, vbraun, nthiery, tscrim, schilly, chapoton, ncohen, bedutra | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #18195 | Stopgaps: |
Description (last modified by )
Sage lacks a lot of feature that are in Latte:
- fast integer point counting in polyhedron
- computation of Ehrart polynomial
just to mention some of them.
Note that Latte has no documentation for its library (only the various command line does have). So it might be nice to ask whether it is stable accross versions to upstream.
See also:
- #18211: Computing Ehrhart polynomials with LattE (command line interface)
Change History (13)
comment:1 Changed 6 years ago by
- Description modified (diff)
comment:2 Changed 6 years ago by
- Dependencies set to #18190
comment:3 Changed 6 years ago by
- Dependencies changed from #18190 to #18195
comment:4 follow-up: ↓ 5 Changed 6 years ago by
comment:5 in reply to: ↑ 4 ; follow-ups: ↓ 6 ↓ 10 Changed 6 years ago by
Replying to jdemeyer:
What is the input for
latte
? I assume a polyhedron given by its vertices (V-representation) or does it also support a polyhedron given by constraints (H-representation)?
By constraints. Actually it would be quite straightforward to have an implementation creating a temporary file and just call count
on this file. The input is basically the same as cdd
as defined in sage.geometry.polyhedron.cdd_file_format
.
But the aim of the ticket is to implement a more direct interface (Matthias Koeppe developing latte is in the loop). Though there is also some work needed from latte side.
Vincent
comment:6 in reply to: ↑ 5 Changed 6 years ago by
Replying to vdelecroix:
Replying to jdemeyer:
What is the input for
latte
? I assume a polyhedron given by its vertices (V-representation) or does it also support a polyhedron given by constraints (H-representation)?By constraints.
...only?
It is required that the vertices are lattice points?
I ask because Polyhedron()
in Sage always computes the vertices. I know from #17920 that this step sometimes takes more time than enumerating the points. So if you really want efficiency, you would want a way to define a Polyhedron
without computing its vertices.
comment:7 Changed 6 years ago by
comment:8 Changed 6 years ago by
Barvinok's method always reduces to counting points in lattice simplices afaik. So you either triangulate (=more than just knowing vertices) or write it as formal addition & subtraction of simplices (less simplices but more complicated to do)
comment:9 Changed 6 years ago by
LattE's input is either the vertices (V-rep) or the inequalities (H-rep). It computes the other representation of the polyhedron (and makes other polyhedral computations) by calling either cddlib, or 4ti2. (Ideally, there should be a way to feed both representations into LattE to avoid recomputation, but this is not implemented.)
@jdemeyer: The vertices can be rational.
comment:10 in reply to: ↑ 5 Changed 6 years ago by
Replying to vdelecroix:
Actually it would be quite straightforward to have an implementation creating a temporary file and just call
count
on this file. The input is basically the same ascdd
as defined insage.geometry.polyhedron.cdd_file_format
.
In fact, when "count" is invoked with --cdd, then CDD file format is accepted.
So building a preliminary interface should indeed be very easy.
comment:11 Changed 6 years ago by
- Description modified (diff)
comment:12 Changed 6 years ago by
- Cc bedutra added
comment:13 Changed 6 years ago by
- Component changed from interfaces to interfaces: optional
What is the input for
latte
? I assume a polyhedron given by its vertices (V-representation) or does it also support a polyhedron given by constraints (H-representation)?