Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CI,ci0 in example non-degenerate to RowMajor / ColMajor #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alecjacobson
Copy link

The example in src/main.cc (accidentally) works even if matrices are passed in column major order instead of QuadProg++'s expected row major order. H is symmetric so under doesn't matter. Likewise, CE is 1x1. But CI is a rectangular matrix and passing its entries in the wrong order (with ci0 left as is), will produce a correct result. As a result I got this example running and then assumed QuadProg++ was using Column Major ordering (doh!).

Not sure many people will run into the same issue as me, but just in case: here's a tiny fix that simply permutes the order of the constraints in CI and ci0 in the example so that using column major will not produce the same result (and in fact will make the problem infeasible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant