Efficient waveguide mode computation using wavelet-like basis functions