Opened 7 years ago

Last modified 7 years ago

#18190 new enhancement

bindings to Latte

Reported by: Vincent Delecroix Owned by:
Priority: major Milestone: sage-6.6
Component: interfaces: optional Keywords:
Cc: Dima Pasechnik, Andrey Novoseltsev, Volker Braun, Nicolas M. Thiéry, Travis Scrimshaw, Harald Schilly, Frédéric Chapoton, Nathann Cohen, Brandon Dutra Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #18195 Stopgaps:

Status badges

Description (last modified by Vincent Delecroix)

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 7 years ago by Dima Pasechnik

Description: modified (diff)

comment:2 Changed 7 years ago by Vincent Delecroix

Dependencies: #18190

comment:3 Changed 7 years ago by Vincent Delecroix

Dependencies: #18190#18195

comment:4 Changed 7 years ago by Jeroen Demeyer

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

comment:5 in reply to:  4 ; Changed 7 years ago by Vincent Delecroix

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 7 years ago by Jeroen Demeyer

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:8 Changed 7 years ago by Volker Braun

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 7 years ago by Matthias Köppe

LattE's input is either the vertices (V-rep) or the inequalities (H-rep). (Ideally, it should accept both, but this is not implemented.) It computes the other representation of the polyhedron (and makes other polyhedral computations) by calling either cddlib, or 4ti2.

The vertices can be rational.

Version 0, edited 7 years ago by Matthias Köppe (next)

comment:10 in reply to:  5 Changed 7 years ago by Matthias Köppe

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 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.

comment:11 Changed 7 years ago by Vincent Delecroix

Description: modified (diff)

comment:12 Changed 7 years ago by Matthias Köppe

Cc: Brandon Dutra added

comment:13 Changed 7 years ago by Jeroen Demeyer

Component: interfacesinterfaces: optional
Note: See TracTickets for help on using tickets.