An RLS type algorithm for generalized eigendecomposition