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

bindings to Latte #18190

Open
videlec opened this issue Apr 14, 2015 · 11 comments
Open

bindings to Latte #18190

videlec opened this issue Apr 14, 2015 · 11 comments

Comments

@videlec
Copy link
Contributor

videlec commented Apr 14, 2015

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:

Depends on #18195

CC: @dimpase @novoselt @vbraun @nthiery @tscrim @haraldschilly @fchapoton @nathanncohen @sagetrac-bedutra

Component: interfaces: optional

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

@videlec videlec added this to the sage-6.6 milestone Apr 14, 2015
@dimpase

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented Apr 14, 2015

Dependencies: #18190

@videlec
Copy link
Contributor Author

videlec commented Apr 14, 2015

Changed dependencies from #18190 to #18195

@jdemeyer
Copy link

comment:4

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)?

@videlec
Copy link
Contributor Author

videlec commented Apr 14, 2015

comment:5

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

@jdemeyer
Copy link

comment:6

Replying to @videlec:

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.

@dimpase
Copy link
Member

dimpase commented Apr 14, 2015

@vbraun
Copy link
Member

vbraun commented Apr 14, 2015

comment:8

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)

@mkoeppe
Copy link
Member

mkoeppe commented Apr 14, 2015

comment:9

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.

@mkoeppe
Copy link
Member

mkoeppe commented Apr 15, 2015

comment:10

Replying to @videlec:

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.

In fact, when "count" is invoked with --cdd, then CDD file format is accepted.

So building a preliminary interface should indeed be very easy.

@videlec

This comment has been minimized.

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

5 participants