Skip to content

Simplify the expression tree #67

@lovasoa

Description

@lovasoa

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>.

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