A class of similarity solutions of the nonlinear diffusion equation