math icon indicating copy to clipboard operation
math copied to clipboard

Laplace: move theta0 to tolerances

Open WardBrian opened this issue 6 months ago • 1 comments

Discussed in https://github.com/stan-dev/math/issues/3202#issuecomment-2968011809, counterpart to https://github.com/stan-dev/stanc3/pull/1521

Summary

Theta0 is now a tolerance parameter rather than required. When not provided, we assume a vector of 0s is sufficient.

This required a bit of re-organization to get the size right, but otherwise wasn't too bad because we call the covariance function pretty early and can get the size from the return of that function.

Tests

Existing tests updated

Side Effects

Release notes

Checklist

  • [x] Copyright holder: (fill in copyright holder information)

    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses: - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause) - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

  • [x] the basic tests are passing

    • unit tests pass (to run, use: ./runTests.py test/unit)
    • header checks pass, (make test-headers)
    • dependencies checks pass, (make test-math-dependencies)
    • docs build, (make doxygen)
    • code passes the built in C++ standards checks (make cpplint)
  • [x] the code is written in idiomatic C++ and changes are documented in the doxygen

  • [x] the new changes are tested

WardBrian avatar Jun 16 '25 15:06 WardBrian

@WardBrian Thanks for taking care of this. @SteveBronder, I feel like you're more familiar with the code at this point and can do this review more expeditiously, but let me know if you don't have the time and need me to jump in.

charlesm93 avatar Jun 17 '25 00:06 charlesm93

Merged in the changes from #3213 @SteveBronder

WardBrian avatar Jun 30 '25 23:06 WardBrian

@SteveBronder mind looking at https://github.com/stan-dev/stanc3/pull/1521? It needs to be merged at the same time as this

WardBrian avatar Jul 01 '25 13:07 WardBrian