Skip to content

Add missing checks on unconstraining functions - #3387

Open
WardBrian wants to merge 2 commits into
developfrom
fix/missing-checks-on-constraint-frees
Open

Add missing checks on unconstraining functions#3387
WardBrian wants to merge 2 commits into
developfrom
fix/missing-checks-on-constraint-frees

Conversation

@WardBrian

Copy link
Copy Markdown
Member

Summary

Unlike e.g. cholesky_factor_free, cholesky_factor_corr_free wasn't checking its inputs. This means that an incorrectly specified user initialization would be silently accepted and unconstrained/reconstrained back to a somewhat arbitrary point, rather than the error every other type provides.

Closes #3380, #3379

Tests

Side Effects

Release notes

Add missing checks to a few unconstraining functions used by initialization.

Checklist

  • Copyright holder: Simons Foundation
    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/)

  • 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)
  • the code is written in idiomatic C++ and changes are documented in the doxygen

  • the new changes are tested

@SteveBronder SteveBronder changed the title Add missing checks on unconstraining functionc Add missing checks on unconstraining functions Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cholesky_corr_free accepts matrices that are not correlation Cholesky factors

1 participant