Hi,

adding meaningful examples is always a good idea. I see two possibilities
to add this for the integrate function:

- (harder) : modify the integrate function with an additional elif
  statement to handle integrate(polynomial,polytope)

- (easier) : add a "seealso::" section in the doc of the integrate
  function to point to that method of polytopes.

Ciao,
Thierry


On Sun, Apr 16, 2017 at 02:33:52AM -0700, mforets wrote:
> this is to suggest adding this example (or a better one) in the global 
> integrate method or somewhere else (the integrate method at 
> multi_polynomial_libsingular.pyx? the problem is that that one seems to be 
> for indefinite integrals only?) : 
> 
> {{{
> For polynomial functions, if the integration region is a polytope the 
> optional package ``latte_int`` can be used::
> 
>     sage: (x, y, z) = polygens(QQ, ['x', 'y', 'z'])
>     sage: f = x^2 * y^2 * z^2
>     sage: polytopes.hypercube(3).integrate(f)    # optional latte_int
>     8/27
> }}}
> 
> i ask because it's kind of specific for polynomials so maybe this is not a 
> great idea. but notice that it may be tricky for the first time, to know 
> that 1st you have to type the integration region then your function, and 
> not the other way round.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to