Hello everybody !!!!

I had a difficult time trying to find a way, in Linear Programming, to
neatly define a sum over a set of elements... This, because I would
like to write a clean function __latex__ for MIP, and that I can not
just output all the constraints, as most of them are of the form
\forall v , \forall i, and I can not just enumerate them.

I thought it would be way better to output in LaTeX beautiful
equations with the \forall v, \forall i, \sum, etc, which take only 2
or 3 lines when enumerating the constraints would take one hundred and
be impossible to read.

Besides, it would make the functions much more efficient by
cythonizing them.

Well, I solved it by convincing myself it was not my job, which was a
pretty good idea :

Is there a way in Sage to define a Formal sum ? Something like
sum( a_i, i \in [0,...5] ) or even worse, sum(a_e, e\in g.edges()) for
g a graph, etc.

I insist it should be a "formal sum",  as it should not return sum
( [a_i for i in range(6) ] ) or sum( [a_e for e in g.edges() ] ) , but
rather an abstract formula for this. It could be evaluated at any
moment, giving different results if the a_i have changed or if the
graph has changed meanwhile.

I think it should not be that obvious at all, though not at all a
waste of time to me....

Could I have your advice about it ? :-)

Nathann
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to