Generalized affine lie algebras and the solution of a class of flows associated with the QR eigenvalue algorithm