An algorithm to solve the Generalized Eigenvalues Problem T*v=\lambda*S*v