From 9b93c08b0933860e88fc17b1591f8ce86c541965 Mon Sep 17 00:00:00 2001 From: Till Hoffmann Date: Wed, 11 Dec 2024 16:59:10 -0500 Subject: [PATCH] Explicit error message for deprecated function (cf stan-dev/stanc3#1470). --- stan/gptools/stan/gptools/fft1.stan | 3 +++ stan/gptools/stan/gptools/fft2.stan | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stan/gptools/stan/gptools/fft1.stan b/stan/gptools/stan/gptools/fft1.stan index 7333564..c1435b3 100644 --- a/stan/gptools/stan/gptools/fft1.stan +++ b/stan/gptools/stan/gptools/fft1.stan @@ -80,6 +80,9 @@ real gp_rfft_log_abs_det_jac(vector cov_rfft, int n) { return - sum(log(rfft_scale[1:n %/% 2 + 1])) -sum(log(rfft_scale[2:(n + 1) %/% 2])) - log(2) * ((n - 1) %/% 2) + n * log(n) / 2; } +real gp_rfft_log_abs_det_jacobian(vector cov_rfft, int n) { + reject("`gp_rfft_log_abs_det_jacobian` has been renamed to `gp_rfft_log_abs_det_jac` to comply with upcoming changes (see https://github.com/stan-dev/stanc3/issues/1470 for details)."); +} /** diff --git a/stan/gptools/stan/gptools/fft2.stan b/stan/gptools/stan/gptools/fft2.stan index d698444..5c02d18 100644 --- a/stan/gptools/stan/gptools/fft2.stan +++ b/stan/gptools/stan/gptools/fft2.stan @@ -171,6 +171,9 @@ real gp_rfft2_log_abs_det_jac(matrix cov_rfft2, int width) { ladj += - log2() * nterms + n * log(n) / 2; return ladj; } +real gp_rfft2_log_abs_det_jacobian(matrix cov_rfft2, int width) { + reject("`gp_rfft2_log_abs_det_jacobian` has been renamed to `gp_rfft2_log_abs_det_jac` to comply with upcoming changes (see https://github.com/stan-dev/stanc3/issues/1470 for details)."); +} /**