cvxgrp / qcml

A Python parser for generating Python/C/Matlab solver interfaces
Other
42 stars 9 forks source link

Simplify on the fly #21

Open echu opened 11 years ago

echu commented 11 years ago

Although we could canonicalize the problem "on the fly," we will elect not to, since having a separate "canonicalize" step makes sense. (You form the problem, then you canonicalize....)

However, having a separate "simplify" step that requires walking the tree multiple times is really not cool; so we would like to "simplify" expressions as we add them. This requires "merging" some aspects of the "coeff_expr" module of codegen with expressions.

We also need to think carefully about params*params coeffs: do we create a new variable? or do we wait until the code generation step?