On Tue, Dec 4, 2018 at 1:47 PM Daniel Krenn <kr...@aon.at> wrote: > > For integrating a polynomial over a polyhedron LattE is used but if the > dimension is not full, then it is not implemented, see > > sage: x, y = polygens(QQ, 'x, y') > sage: P = Polyhedron(vertices=[[0,0],[1,1]]) > sage: P.integrate(x*y) # optional - latte_int > Traceback (most recent call last): > ... > NotImplementedError: The polytope must be full-dimensional. > > from > > http://doc.sagemath.org/html/en/reference/discrete_geometry/sage/geometry/polyhedron/base.html#sage.geometry.polyhedron.base.Polyhedron_base.integrate > > I wonder if there is a (simple) way to come around this? > > [I might not be that familiar with integration over polyhedra, but > shouldn't that basically be a somehow "nice" transformation where some > Jacobi-determinant comes into play?
you need an orthonormal transformation, thus potentially square roots, if you just want to move over to P.affine_hull() and integrate there. But the restriction to full-dimensional isn't really hard to overcome with a generalisation of the method in LattE, and I see how to do this, I think. If anyone cares I could implement this. > Or are there other > mathematical/technical difficulties that arise?] > > Best, Daniel > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To post to this group, send email to sage-support@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.