From 80168bb90c39c6350082a9d1108dc0b6f14cae75 Mon Sep 17 00:00:00 2001 From: Stan Jenkins Date: Thu, 7 Dec 2023 07:04:18 -0500 Subject: [PATCH] [Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1 --- stan/math/prim/prob/inv_wishart_cholesky_rng.hpp | 6 +++--- .../math/prim/prob/inv_wishart_cholesky_rng_test.cpp | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/stan/math/prim/prob/inv_wishart_cholesky_rng.hpp b/stan/math/prim/prob/inv_wishart_cholesky_rng.hpp index f1fed4dff62..a3376db5326 100644 --- a/stan/math/prim/prob/inv_wishart_cholesky_rng.hpp +++ b/stan/math/prim/prob/inv_wishart_cholesky_rng.hpp @@ -14,9 +14,9 @@ namespace math { * from the inverse Wishart distribution with the specified degrees of freedom * using the specified random number generator. * - * Axen, Seth D. "Efficiently generating inverse-Wishart matrices and their Cholesky factors." - * arXiv preprint arXiv:2310.15884 (2023). - * + * Axen, Seth D. "Efficiently generating inverse-Wishart matrices and their + * Cholesky factors." arXiv preprint arXiv:2310.15884 (2023). + * * @tparam RNG Random number generator type * @param[in] nu scalar degrees of freedom * @param[in] L_S lower Cholesky factor of the scale matrix diff --git a/test/unit/math/prim/prob/inv_wishart_cholesky_rng_test.cpp b/test/unit/math/prim/prob/inv_wishart_cholesky_rng_test.cpp index 521249a926c..536911e174d 100644 --- a/test/unit/math/prim/prob/inv_wishart_cholesky_rng_test.cpp +++ b/test/unit/math/prim/prob/inv_wishart_cholesky_rng_test.cpp @@ -98,7 +98,8 @@ TEST(ProbDistributionsInvWishartCholesky, SpecialRNGTest) { MatrixXd L = MatrixXd::Identity(k, k); MatrixXd Z = MatrixXd::Zero(k, k); for (int i = 0; i < N; i++) { - Z += multiply_lower_tri_self_transpose(inv_wishart_cholesky_rng(k + 2, L, rng)); + Z += multiply_lower_tri_self_transpose( + inv_wishart_cholesky_rng(k + 2, L, rng)); } Z /= N; for (int j = 0; j < k; j++) { @@ -113,7 +114,7 @@ TEST(ProbDistributionsInvWishartCholesky, SpecialRNGTest) { } TEST(ProbDistributionsInvWishartCholesky, compareToInvWishart) { - // Compare the marginal mean + // Compare the marginal mean using Eigen::MatrixXd; using Eigen::VectorXd; @@ -132,12 +133,13 @@ TEST(ProbDistributionsInvWishartCholesky, compareToInvWishart) { MatrixXd Z_mean = sigma / (k + 3); MatrixXd Z_est = MatrixXd::Zero(k, k); for (int i = 0; i < N; i++) { - Z_est += multiply_lower_tri_self_transpose(inv_wishart_cholesky_rng(k + 4, L, rng)); + Z_est += multiply_lower_tri_self_transpose( + inv_wishart_cholesky_rng(k + 4, L, rng)); } Z_est /= N; for (int j = 0; j < k; j++) { for (int i = 0; i < j; i++) { - EXPECT_NEAR(Z_est(i, j), Z_mean(i, j), tol); + EXPECT_NEAR(Z_est(i, j), Z_mean(i, j), tol); } } }