cvxgrp/qcml — pull request #25 by chinasaur (2013-09-11 23:24:58+00:00)
Title: Matlab/1

Hey, so here's a first pass for you to look at. It successfully stuffs params into data, but when I try to run ECOS on it I get Dual Infeasible. I notice that the stuff results from this look dualized compared to the direct ECOS feeding I had manually reverse engineered from CVX, so maybe something going on there...? Probably the thing to do is test the python and C versions with the real data now.

There was some ugliness around 0/1 indexing; see inline comments and commit logs. Basically I originally tried to just make everything 1 indexed, but there were Just objects that were used for indexing, so I didn't know if it would be okay to add 1 to those. Seemed like better not to, so I went back to 0 indexing in matlab_encoder and just add 1 to Gi Gj Ai Aj before calling sparse in functions_return to convert from triplet to column compressed. In matlab/codegen on the otherhand, it's all 1 indexed to start. I'm hoping this can be cleaned up but haven't figured it out yet.

Certainly possible that there are indexing issues due to the above, although the dimensions seem to come out right. Also likely this hack will not be compatible with future plans, if the 0 indexed stuff from matlab_encoder ever shows up somewhere other than Gi Gj Ai Aj, so we probably do need to resolve it. It seems to come down to Just, but there might be other things I missed.

I also tweaked cbp.py to take some helpful command line arguments. And I updated .gitignore.