On Mon, Jun 16, 2008 at 12:13, Luke <[EMAIL PROTECTED]> wrote: > Essentially what I need to do is parse every equation and identify > subexressions (and then parse those subexpression and identify > subsubexpressions....), and introduce variables for any that are used > more than once. If a subexpression is found, but doesn't occur more > than once in any of the preceding equations, but then later shows up > in another equation, it would then be introduced as an intermediate > variable. If they aren't used more than once, then it doesn't make > sense to introduce an intermediate variable for them, unless the goal > is simply just readability. > > Any ideas on how to start parsing each equation and accumulating a > list of subexpressions?
Look at the code I provided attached to the issue. http://sympy.googlecode.com/issues/attachment?aid=3304519749492286715&name=cse.py -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---
