Foundations of Wavelet Networks and Applications