Abstract
In calculating integral or discrete transforms, use has been made of fast algorithms for multiplying vectors by matrices whose elements are specified as values of special (Chebyshev, Legendre, Jacobi, Laguerre, etc.) functions. To achieve higher efficiency, a convenient general approach for calculating matrix-vector products for some class of problems is proposed. A series of fast simple-structure algorithms developed under this approach can be efficiently implemented with software based on modern microprocessors. Computational experiments show that the method has a precomputation complexity of \(O(N^2 \log N)\) and an execution complexity of \(O(N \log N)\) in general. This agrees with the analytical estimates obtained for trigonometric functions. In addition, for trigonometric functions, the number of arithmetic operations at the preliminary stage can be decreased to \(O(N \log N)\). The results of computational experiments with the algorithms show that these procedures can decrease the calculation time by several orders of magnitude compared with a conventional direct method of matrix-vector multiplication.
Similar content being viewed by others
Data availability
Data sharing is not applicable to this article as no datasets were generated or analyzed during the current study.
References
Cooley, J., Tukey, J.: An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation 19(90), 297–301 (1965)
Dutt, A., Rokhlin, V.: Fast Fourier transforms for nonequispaced data. SIAM Journal on Scientific Computing 14(6), 1368–1393 (1993)
Greengard, L., Lee, J.-Y.: Accelerating the nonuniform fast Fourier transform. SIAM Review 46(3), 443–454 (2004)
Plonka, G., Potts, D., Steidl, G., Tasche, M.: Numerical Fourier Analysis. Springer International Publishing, New York (2018)
Jackson, J.I., Meyer, C.H., Nishimura, D.G., Macovski, A.: Selection of a convolution function for Fourier inversion using gridding (computerised tomography application). IEEE Transactions on Medical Imaging 10(3), 473–478 (1991)
Boyd, J.P.: A fast algorithm for Chebyshev, Fourier, and sinc interpolation onto an irregular grid. Journal of Computational Physics 103(2), 243–257 (1992)
Beylkin, G.: On the fast Fourier transform of functions with singularities. Applied and Computational Harmonic Analysis 2(4), 363–381 (1995)
Liu, Q.H., Nguyen, N.: An accurate algorithm for nonuniform fast Fourier transforms (NUFFT’s). IEEE Microwave and Guided Wave Letters 8(1), 18–20 (1998)
Fessler, J.A., Sutton, B.P.: Nonuniform fast Fourier transforms using min-max interpolation. IEEE Transactions on Signal Processing 51(2), 560–574 (2003)
Anderson, C., Dahleh, M.D.: Rapid computation of the discrete Fourier transform. SIAM Journal on Scientific Computing 17(4), 913–919 (1996)
Bailey, D.H., Swarztrauber, P.N.: The fractional Fourier transform and applications. SIAM Review 33(3), 389–404 (1991)
Ruiz-Antolín, D., Townsend, A.: A nonuniform fast Fourier transform based on low rank approximation. SIAM Journal on Scientific Computing 40(1), A529–A547 (2018)
O’Neil, M., Woolfe, F., Rokhlin, V.: An algorithm for the rapid evaluation of special function transforms. Applied and Computational Harmonic Analysis 28(2), 203–226 (2010)
NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/, Release 1.1.2 of 2021-06-15. Olver, F.W.J., Olde Daalhuis, A.B., Lozier, D.W., Schneider, B.I., Boisvert, R.F., Clark, C.W., Miller, B.R., Saunders, B.V., Cohl, H.S., McClain, M.A. (eds)
Ahmed, N., Natarajan, T., Rao, K.R.: Discrete cosine transform. IEEE Transactions on Computers C–23(1), 90–93 (1974)
Chen, W.H., Smith, C., Fralick, S.: A fast computational algorithm for the discrete cosine transform. IEEE Transactions on Communications 25(9), 1004–1009 (1977)
Driscoll, T.A., Hale, N., Trefethen, L.N.: Chebfun Guide. Pafnuty Publications (2014)
Alpert, B., Rokhlin, V.: A fast algorithm for the evaluation of Legendre expansions. SIAM Journal on Scientific and Statistical Computing 12(1), 158–179 (1991)
Hale, N., Townsend, A.: A fast, simple, and stable Chebyshev-Legendre transform using an asymptotic formula. SIAM Journal on Scientific Computing 36(1), A148–A167 (2014)
Shen, J., Wang, Y., Xia, J.: Fast structured Jacobi-Jacobi transforms. Mathematics of Computation 88, 1743–1772 (2019)
Slevinsky, R.M.: On the use of Hahn’s asymptotic formula and stabilized recurrence for a fast, simple and stable Chebyshev-Jacobi transform. IMA Journal of Numerical Analysis 38(1), 102–124 (2017)
Micheli, E., Viano, G.A.: The expansion in Gegenbauer polynomials: A simple method for the fast computation of the Gegenbauer coefficients. Journal of Computational Physics 239, 112–122 (2013)
Bremer, J., Yang, H.: Fast algorithms for Jacobi expansions via nonoscillatory phase functions. IMA Journal of Numerical Analysis 40(3), 2019–2051 (2019)
Townsend, A., Webb, M., Olver, S.: Fast polynomial transforms based on Toeplitz and Hankel matrices. Math. Comput. 87 (2016)
Bostan, A., Salvy, B., Schost, E.: Fast conversion algorithms for orthogonal polynomials. Linear Algebra and its Applications 432(1), 249–258 (2010)
Tygert, M.: Recurrence relations and fast algorithms. Applied and Computational Harmonic Analysis 28(1), 121–128 (2010)
Potts, D., Steidl, G., Tasche, M.: Fast algorithms for discrete polynomial transforms. Mathematics of Computations 67, 1577–1590 (1998)
Keiner, J.: Computing with expansions in Gegenbauer polynomials. SIAM Journal on Scientific Computing 31(3), 2151–2171 (2009)
Leibon, G., Rockmore, D.N., Park, W., Taintor, R., Chirikjian, G.S.: A fast Hermite transform. Theor. Comput. Sci. 409(2), 211–228 (2008) Symbolic-Numerical Computations
Beylkin, G., Coifman, R., Rokhlin, V.: Fast wavelet transforms and numerical algorithms I. Communications on Pure and Applied Mathematics 44(2), 141–183 (1991)
Aharoni, G., Averbuch, A., Coifman, R., Israeli, M.: Local cosine transform - a method for the reduction of the blocking effect in JPEG. Journal of Mathematical Imaging and Vision 3(1), 7–38 (1993)
Matviyenko, G.: Optimized local trigonometric bases. Applied and Computational Harmonic Analysis 3(4), 301–323 (1996)
Mohlenkamp, M.J.: A fast transform for spherical harmonics. Journal of Fourier Analysis and Applications 5(2), 159–184 (1999)
Michielssen, E., Boag, A.: A multilevel matrix decomposition algorithm for analyzing scattering from large structures. IEEE Transactions on Antennas and Propagation 44(8), 1086–1093 (1996)
Yin, F., Wu, J., Song, J., Yang, J.: A high accurate and stable Legendre transform based on block partitioning and butterfly algorithm for NWP. Mathematics 7(10), (2019)
Wedi, N.P., Hamrud, M., Mozdzynski, G.: A fast spherical harmonics transform for global nwp and climate models. Monthly Weather Review 141(10), 3450–3461 (2013)
Boyd, J.P.: Chebyshev and Fourier Spectral Methods. Dover, New York (2001)
Harris, F.J.: On the use of windows for harmonic analysis with the discrete Fourier transform. Proceedings of the IEEE 66(1), 51–83 (1978)
Prabhu, K.M.M.: Window functions and their applications in signal processing. CRC Press, Boca Raton (2018)
Kaiser, J., Schafer, R.: On the use of the I0-sinh window for spectrum analysis. IEEE Transactions on Acoustics, Speech, and Signal Processing 28(1), 105–107 (1980)
Mallat, S.: A Wavelet Tour of Signal Processing, Third Edition: The Sparse Way, 3rd edn. Academic Press Inc, USA (2008)
Schaeffer, N.: Efficient spherical harmonic transforms aimed at pseudospectral numerical simulations. Geochemistry, Geophysics, Geosystems 14(3), 751–758 (2013)
Terekhov, A.V.: The Laguerre finite difference one-way equation solver. Computer Physics Communications 214, 71–82 (2017)
Terekhov, A.V.: The stabilization of high-order multistep schemes for the Laguerre one-way wave equation solver. Journal of Computational Physics 368, 115–130 (2018)
Mikhailenko, B.G.: Spectral Laguerre method for the approximate solution of time dependent problems. Applied Mathematics Letters 12, 105–110 (1999)
Abate, J., Choudhury, G., Whitt, W.: On the Laguerre method for numerically inverting Laplace transforms. Informs J. on Computing 8(4), 413–427 (1996)
Terekhov, A.V.: Generating the Laguerre expansion coefficients by solving a one-dimensional transport equation. Numerical Algorithms 89(1), 303–322 (2021)
Mikhailenko, B.G.: Simulation of seismic wave propagation in heterogeneous media. Siberian J. of Numer. Mathematics 6, 415–429 (2003)
Nussbaumer, H.J.: Fast Fourier Transform and Convolution Algorithms. Springer-Verlag, New York (1982)
Gil, A., Segura, J., Temme, N.M.: Fast and reliable high-accuracy computation of Gauss-Jacobi quadrature. Numerical Algorithms 87(4), 1391–1419 (2020)
Acknowledgements
The study of proposed algorithms was financially supported by RFBR and Novosibirsk region (Project No. 20-41-540003).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The author declares no competing interests.
Appendix: An efficient precomputation procedure for trigonometric transforms
Appendix: An efficient precomputation procedure for trigonometric transforms
In the case of calculation of nonuniform trigonometric transformations, the precomputation costs of Algorithms 1 and 2 can be reduced from \(O(N^2\log N)\) to \(O(N \log N +Nq)\) arithmetic operations, where q is determined by the required computation accuracy. As an example, let us consider an efficient procedure for calculating a row of the compressed matrix (7).
First, according to the inverse convolution theorem, for any \(\mathbf {X},\mathbf {Y}\in \mathbb {C}^{N}\) we have
where \(\odot\) denotes the component-wise product and
Figure 2 shows that the Kaiser window can be approximated by a small number of coefficients of the Fourier series denoted here as \(\tilde{x}_m\). Since in the discrete case for the Kaiser window no efficient formula for calculating individual Fourier components is known, the calculation of several components of the spectrum \(\tilde{x}_m\) using FFT will require \(O(N\log N)\) operations. This operation is performed once for all columns or rows of the transformation matrix.
Second, Fig. 3b shows that there is no need to calculate all elements of a compressed matrix row by formula (A.1). It is sufficient to calculate about 24 convolutions of the form (A.1) for each row to ensure an accuracy of transformation of the order \(10^{-15}\).
Third, depending on the trigonometric transformation type given by the matrix A, the individual DFT components for the rows of the matrix A can be calculated by one of the following formulas:
where \(\omega _N=\exp {\left( -{2\pi \mathrm {i}}/{N}\right) }\). The variables \(\theta\) and k in formulas (A.2)-(A.4) are separated, which reduces the precomputation time. As a result, the total cost of calculating all rows of the matrix (7) will be proportional to \(O(N \log N+Nq)\), where the first term is the number of operations required for a single FFT calculation for the Kaiser window, and the second term is the number of operations of N convolutions of the form (A.1) to calculate the compressed matrix elements.
Rights and permissions
Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Terekhov, A.V. An extra-component method for evaluating fast matrix-vector multiplication with special functions. Numer Algor 92, 2189–2217 (2023). https://doi.org/10.1007/s11075-022-01383-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11075-022-01383-y