|
1 | 1 | # Deprecated Functions |
2 | 2 |
|
3 | 3 | This appendix lists currently deprecated functionality along with how to |
4 | | -replace it. These deprecated features are likely to be removed in the future. |
| 4 | +replace it. |
5 | 5 |
|
6 | | -```{r results='asis', echo=FALSE} |
7 | | -if (knitr::is_html_output()) { |
8 | | - cat(' * <a href="functions-old-ode-solver.html">integrate_ode_rk45, integrate_ode_adams, integrate_ode_bdf ODE Integrators</a>\n') |
9 | | -} |
10 | | -``` |
| 6 | +Starting in Stan 2.29, deprecated functions with drop in replacements (such as |
| 7 | +the renaming of `get_lp` or `multiply_log`) will be removed 3 versions later |
| 8 | +e.g., functions deprecated in Stan 2.20 will be removed in Stan 2.23 and placed |
| 9 | +in [Removed Functions]. The Stan compiler can |
| 10 | +[automatically update](https://mc-stan.org/docs/stan-users-guide/stanc-pretty-printing.html) |
| 11 | +these on the behalf of the user. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## `multiply_log` and `binomial_coefficient_log` functions |
| 16 | + |
| 17 | +*Deprecated*: Currently two non-conforming functions ending in suffix |
| 18 | + `_log`. |
| 19 | + |
| 20 | +*Replacement*: Replace `multiply_log(...)` with `lmultiply(...)`. |
| 21 | + Replace `binomial_coefficient_log(...)` with `lchoose(...)`. |
| 22 | + |
| 23 | +*Scheduled Removal*: Stan 2.32 |
| 24 | + |
| 25 | + |
| 26 | +## `get_lp()` function |
| 27 | + |
| 28 | +*Deprecated*: The built-in no-argument function `get_lp()` is deprecated. |
| 29 | + |
| 30 | +*Replacement*: Use the no-argument function `target()` instead. |
| 31 | + |
| 32 | +*Scheduled Removal*: Stan 2.32 |
| 33 | + |
| 34 | +## `abs(real x)` function |
| 35 | + |
| 36 | +*Deprecated*: Use of the `abs` function with real-valued arguments |
| 37 | + is deprecated; use functions `fabs` instead. |
| 38 | + |
| 39 | + |
| 40 | +## Integer division with `operator/` |
| 41 | + |
| 42 | +*Deprecated*: Using `/` with two integer arguments is interpreted as integer |
| 43 | +floor division, such that |
| 44 | + |
| 45 | +$$ 1 / 2 = 0 $$ |
| 46 | + |
| 47 | +This is deprecated due to its confusion with real-valued division, where |
| 48 | + |
| 49 | +$$ 1.0 / 2.0 = 0.5 $$ |
| 50 | + |
| 51 | +*Replacement*: Use the integer division operator `operator%/%` instead. |
11 | 52 |
|
12 | | -```{r results='asis', echo=FALSE} |
13 | | -if (knitr::is_html_output()) { |
14 | | - cat(' * <a href="cov_exp_quad.html">cov_exp_quad</a>\n') |
15 | | -} |
16 | | -``` |
17 | 53 |
|
18 | 54 | ## integrate_ode_rk45, integrate_ode_adams, integrate_ode_bdf ODE Integrators {#functions-old-ode-solver} |
19 | 55 |
|
@@ -166,7 +202,7 @@ with values consisting of solutions at the specified times. |
166 | 202 | The sizes must match, and in particular, the following groups are of |
167 | 203 | the same size: |
168 | 204 |
|
169 | | - * state variables passed into the system function, derivatives |
| 205 | +* state variables passed into the system function, derivatives |
170 | 206 | returned by the system function, initial state passed into the |
171 | 207 | solver, and rows of the return value of the solver, |
172 | 208 |
|
|
198 | 234 |
|
199 | 235 | `matrix` **`cov_exp_quad`**`(row_vectors x, real alpha, real rho)`<br>\newline |
200 | 236 | The covariance matrix with an exponentiated quadratic kernel of x. |
201 | | -`r since("2.16")` |
| 237 | +`r since("2.16, deprecated since 2.20, scheduled for removal in 2.32")` |
202 | 238 |
|
203 | 239 | <!-- matrix; cov_exp_quad; (vectors x, real alpha, real rho); --> |
204 | 240 | \index{{\tt \bfseries cov\_exp\_quad }!{\tt (vectors x, real alpha, real rho): matrix}|hyperpage} |
205 | 241 |
|
206 | 242 | `matrix` **`cov_exp_quad`**`(vectors x, real alpha, real rho)`<br>\newline |
207 | 243 | The covariance matrix with an exponentiated quadratic kernel of x. |
208 | | -`r since("2.16")` |
| 244 | +`r since("2.16, deprecated since 2.20, scheduled for removal in 2.32")` |
209 | 245 |
|
210 | 246 | <!-- matrix; cov_exp_quad; (array[] real x, real alpha, real rho); --> |
211 | 247 | \index{{\tt \bfseries cov\_exp\_quad }!{\tt (array[] real x, real alpha, real rho): matrix}|hyperpage} |
212 | 248 |
|
213 | 249 | `matrix` **`cov_exp_quad`**`(array[] real x, real alpha, real rho)`<br>\newline |
214 | 250 | The covariance matrix with an exponentiated quadratic kernel of x. |
215 | | -`r since("2.16")` |
| 251 | +`r since("2.16, deprecated since 2.20, scheduled for removal in 2.32")` |
216 | 252 |
|
217 | 253 | <!-- matrix; cov_exp_quad; (row_vectors x1, row_vectors x2, real alpha, real rho); --> |
218 | 254 | \index{{\tt \bfseries cov\_exp\_quad }!{\tt (row\_vectors x1, row\_vectors x2, real alpha, real rho): matrix}|hyperpage} |
219 | 255 |
|
220 | 256 | `matrix` **`cov_exp_quad`**`(row_vectors x1, row_vectors x2, real alpha, real rho)`<br>\newline |
221 | 257 | The covariance matrix with an exponentiated quadratic kernel of x1 and |
222 | 258 | x2. |
223 | | -`r since("2.18")` |
| 259 | +`r since("2.18, deprecated since 2.20, scheduled for removal in 2.32")` |
224 | 260 |
|
225 | 261 | <!-- matrix; cov_exp_quad; (vectors x1, vectors x2, real alpha, real rho); --> |
226 | 262 | \index{{\tt \bfseries cov\_exp\_quad }!{\tt (vectors x1, vectors x2, real alpha, real rho): matrix}|hyperpage} |
227 | 263 |
|
228 | 264 | `matrix` **`cov_exp_quad`**`(vectors x1, vectors x2, real alpha, real rho)`<br>\newline |
229 | 265 | The covariance matrix with an exponentiated quadratic kernel of x1 and |
230 | 266 | x2. |
231 | | -`r since("2.18")` |
| 267 | +`r since("2.18, deprecated since 2.20, scheduled for removal in 2.32")` |
232 | 268 |
|
233 | 269 | <!-- matrix; cov_exp_quad; (array[] real x1, array[] real x2, real alpha, real rho); --> |
234 | 270 | \index{{\tt \bfseries cov\_exp\_quad }!{\tt (array[] real x1, array[] real x2, real alpha, real rho): matrix}|hyperpage} |
235 | 271 |
|
236 | 272 | `matrix` **`cov_exp_quad`**`(array[] real x1, array[] real x2, real alpha, real rho)`<br>\newline |
237 | 273 | The covariance matrix with an exponentiated quadratic kernel of x1 and |
238 | 274 | x2. |
239 | | -`r since("2.18")` |
| 275 | +`r since("2.18, deprecated since 2.20, scheduled for removal in 2.32")` |
0 commit comments