Quadratic programming techniques using matrix pseudoinverses