The Rayleigh-Ritz Method With Quasi-Comparison Functions in Nonself-Adjoint Problems