cvxgrp / qcml

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

Convert dictionary to expression tree #13

Closed echu closed 11 years ago

echu commented 11 years ago

when adding two lists, if coeffs match, concat / "add" its children, if not, concat the two lists

easy to go from expression tree with linear operators on the "outside"

a(x+y+z) + x + b(a*(y+ z))

to an affine expression (walk the tree, populate the dict), which is what we need for something like CVXOPT.

however, we need the tree for codegen for scientific computing