Generalized Inverses: Theory and Computations