Is it just a question of replacing the old cse symbols in the new
expression before calling cse, then merging the results? I think that
wouldn't be hard, though probably complicated enough that direct
support could be added.


Aaron Meurer

On Wed, Nov 4, 2020 at 11:40 AM Jason Moore <moorepa...@gmail.com> wrote:
>
> Hi,
>
> I'd like to be able to do something like this:
>
> expr = ....
> com_sub_exprs, simplified_expr = cse(expr)
> new_expr = do_operations_on(simplified_expr)
> com_sub_exprs, simpflied_new_expr = cse(new_expr, start_with=com_sub_exprs)
>
> This would let the cse() of new_expr use the existing set of sub expressions 
> as the starting set and add more as needed, as those subexpression may exist 
> in new_expr.
>
> Is there a way to do this with existing functionality or would I need to add 
> this "start_with" piece to cse() as a new feature?
>
> Thanks,
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CAP7f1AgCh2yqarPodb-EhZ8X_Gp7SxuscDo57jSkLt371y9swQ%40mail.gmail.com.

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6J3mtqLU%3DG6y%2BzrAX_oq8DLTqPfTj%2Bp3_cP36Ub_qk8%3DA%40mail.gmail.com.

Reply via email to