On Thursday, February 20, 2014 2:17:07 AM UTC+1, Aaron Meurer wrote:
>
> On Wed, Feb 19, 2014 at 7:14 PM, Matthew Rocklin 
> <[email protected]<javascript:>> 
> wrote: 
> > My guess is that Mul and Add will always just create Add and Mul 
> objects. 
> > Other functions will then be used to perform various simplifications on 
> > these lists. 
> > 
> > This is how sets work with Union and Intersection.  You call Union(a, b, 
> c, 
> > d) where a, b, c, d are all sets.  This makes a Union object containing 
> > these four sets.  If evaluate=True then Union asks all of a, b, c, d if 
> they 
> > know how to simplify themselves against any of the others.  This might 
> not 
> > be maximally efficient but it works surprisingly well and is very 
> > extensible.  The organization of methods would definitely improve 
> through 
> > multiple dispatch. 
>
> Efficiency does matter in the core, though. We may need to make 
> tradeoffs, or else somehow heavily optimize the common case. 
>
>
Maybe using Python's itertools/functools? I would check if some of these 
logical operations can be performed by properly using Python's standard 
library, which is partly implemented in C, and would give good efficiency 
advantages.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to