added and tested multi-variable gradient descent.  Some refactoring to the optimisation package
added inverse and pseudoinverse for real and complex matrices