You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
It would be quite nice if the quadratic objective function supported basic vector operations (vectors in the mathematical sense) such as addition and scalar multiplication. It's quite common to want to combine various quadratic objective functions possibly with a weighting. A proposed API would be:
Mathematically, this is trivial because f=x(Q+P)x+(c+d)x=xQx+xPx+cx+dc=f1+f2 but, syntactically, it would be really nice to write the maths and not have to scale and add individual matrices and vectors etc. If you like it, I'll add it. It's probably a quick job but there are some dictionaries floating around in that function that will need to be handled with care.
p.s. - This line looks a bit suspicious to me. That only works if Q is symmetric but the class permits you to pass in a non-symmetric matrix. It should either calculate 0.5*(Q+Q')*x or throw an Exception if non-symmetric matrices are passed in. I would propose the latter. Assuming the latter, Q.Dot(input) would be much faster.