Continuum discretization in a basis of transformed harmonic-oscillator states