An LCP solver based on Lemke's method.
Given a matrix
Eigen::Matrix<double, 2, 2> M {
{1, -5},
{2, 1}
};
Eigen::Vector<double, 2> q {-4, 3};
LCP sol = LCPSolve(M, q);
sol.z = [4 0]
sol.w = [0 11]
sol.exitCond = 0
0 - Valid solution found.
1 - Secondary ray termination (approximate solution).
2 - Incorrect input dimensions.
3 - Exceeded maximum iterations.
4 - Numerical overflow/underflow.