@@ -304,13 +304,10 @@ namespace cppdlr {
304304 * @return Values of h = f * g on DLR imaginary time grid
305305 * */
306306 template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
307- typename T::regular_type convolve (double beta, statistic_t statistic, T const &fc, T const &gc, bool time_order = false ) const {
307+ typename T::regular_type convolve (double beta, T const &fc, T const &gc, bool time_order = false ) const {
308308
309309 if (r != fc.shape (0 ) || r != gc.shape (0 )) throw std::runtime_error (" First dim of input arrays must be equal to DLR rank r." );
310310
311- // TODO: implement bosonic case and remove
312- if (statistic == 0 ) throw std::runtime_error (" imtime_ops::convolve not yet implemented for bosonic Green's functions." );
313-
314311 // Initialize convolution, if it hasn't been done already
315312 if (!time_order & hilb.empty ()) { convolve_init (); }
316313 if (time_order & thilb.empty ()) { tconvolve_init (); }
@@ -353,6 +350,22 @@ namespace cppdlr {
353350 }
354351 }
355352
353+ /* *
354+ * @brief Deprecated overload of convolve method
355+ *
356+ * This version includes an unused extra parameter for backward
357+ * compatibility.
358+ *
359+ * @deprecated Use convolve(beta, fc, gc, time_order) instead; this works for
360+ * both fermionic and bosonic functions.
361+ */
362+ template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
363+ [[deprecated(" Use convolve(beta, fc, gc, time_order) instead." )]] typename T::regular_type
364+ convolve (double beta, statistic_t statistic, T const &fc, T const &gc, bool time_order = false ) const {
365+ (void )statistic; // Unused parameter, kept for backward compatibility
366+ return convolve (beta, fc, gc, time_order);
367+ }
368+
356369 /* *
357370 * @brief Compute convolution of two imaginary time Green's functions,
358371 * given matrix of convolution by one of them
@@ -449,7 +462,7 @@ namespace cppdlr {
449462 * r*norb2 x r*norb3 matrix, or a block r x 1 matrix of norb2 x norb3 blocks.
450463 * */
451464 template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
452- nda::matrix<S> convmat (double beta, statistic_t statistic, T const &fc, bool time_order = false ) const {
465+ nda::matrix<S> convmat (double beta, T const &fc, bool time_order = false ) const {
453466
454467 int n, m;
455468
@@ -464,11 +477,27 @@ namespace cppdlr {
464477 }
465478
466479 auto fconv = nda::matrix<S, nda::C_layout>(n, m); // Matrix of convolution by f
467- convmat_inplace (nda::matrix_view<S, nda::C_layout>(fconv), beta, statistic, fc, time_order);
480+ convmat_inplace (nda::matrix_view<S, nda::C_layout>(fconv), beta, fc, time_order);
468481
469482 return fconv;
470483 }
471484
485+ /* *
486+ * @brief Deprecated overload of convmat method
487+ *
488+ * This version includes an unused extra parameter for backward
489+ * compatibility.
490+ *
491+ * @deprecated Use convmat(beta, fc, time_order) instead; this works for both
492+ * fermionic and bosonic functions.
493+ */
494+ template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
495+ [[deprecated(" Use convmat(beta, fc, time_order) instead." )]] nda::matrix<S> convmat (double beta, statistic_t statistic, T const &fc,
496+ bool time_order = false ) const {
497+ (void )statistic; // Unused parameter, kept for backward compatibility
498+ return convmat (beta, fc, time_order);
499+ }
500+
472501 /* *
473502 * @brief Compute matrix of convolution by an imaginary time Green's function
474503 * in place
@@ -519,13 +548,10 @@ namespace cppdlr {
519548 * r*norb2 x r*norb3 matrix, or a block r x 1 matrix of norb2 x norb3 blocks.
520549 * */
521550 template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
522- void convmat_inplace (nda::matrix_view<S, nda::C_layout> fconv, double beta, statistic_t statistic, T const &fc, bool time_order = false ) const {
551+ void convmat_inplace (nda::matrix_view<S, nda::C_layout> fconv, double beta, T const &fc, bool time_order = false ) const {
523552
524553 if (r != fc.shape (0 )) throw std::runtime_error (" First dim of input array must be equal to DLR rank r." );
525554
526- // TODO: implement bosonic case and remove
527- if (statistic == 0 ) throw std::runtime_error (" imtime_ops::convmat not yet implemented for bosonic Green's functions." );
528-
529555 // Initialize convolution, if it hasn't been done already
530556 if (!time_order & hilb.empty ()) { convolve_init (); }
531557 if (time_order & thilb.empty ()) { tconvolve_init (); }
@@ -622,6 +648,22 @@ namespace cppdlr {
622648 }
623649 }
624650
651+ /* *
652+ * @brief Deprecated overload of convmat_inplace method
653+ *
654+ * This version includes an unused extra parameter for backward
655+ * compatibility.
656+ *
657+ * @deprecated Use convmat_inplace(fconv, beta, fc, time_order) instead; this
658+ * works for both fermionic and bosonic functions.
659+ */
660+ template <nda::MemoryArray T, nda::Scalar S = nda::get_value_t <T>>
661+ [[deprecated(" Use convmat_inplace(fconv, beta, fc, time_order) instead." )]] void
662+ convmat_inplace (nda::matrix_view<S, nda::C_layout> fconv, double beta, statistic_t statistic, T const &fc, bool time_order = false ) const {
663+ (void )statistic; // Unused parameter, kept for backward compatibility
664+ return convmat_inplace (fconv, beta, fc, time_order);
665+ }
666+
625667 /* *
626668 * @brief Compute inner product of two imaginary time Green's functions
627669 *
0 commit comments