Skip to content

Navigation Menu

Sign in
Sign up

Simplify the expression tree #67

Open

Description

What would you think about simplifying the expression tree by

  • Removing SubExpr (and replacing it with Add(Mul(-1, expr))
  • Replacing AddExpr(left, right) by AddExpr(Vec<expr>), to avoid creating deep trees (that cause Simplify overflows the stack #37 )

This is not perfect, but should be easy to implement as a workaround for now. Would you accept such a PR ?

A more ambitious refactor that we can keep for later is to implement the expression as a simple HashMap<Variable, Coefficient>.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /