Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Jan 30, 2024
1 parent a92cdb1 commit ebe8da2
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ TEST(BaseHamiltonian, update_potential_gradient) {
funnel_model_namespace::funnel_model model(data_var_context, 0,
&model_output);

stan::mcmc::mock_hamiltonian<funnel_model_namespace::funnel_model, stan::rng_t>
stan::mcmc::mock_hamiltonian<funnel_model_namespace::funnel_model,
stan::rng_t>
metric(model);
stan::mcmc::ps_point z(11);
z.q.setOnes();
Expand Down
2 changes: 0 additions & 2 deletions src/test/unit/mcmc/hmc/hamiltonians/dense_e_metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ TEST(McmcDenseEMetric, sample_p) {
}

TEST(McmcDenseEMetric, gradients) {

Eigen::VectorXd q = Eigen::VectorXd::Ones(11);

stan::mcmc::dense_e_point z(q.size());
Expand Down Expand Up @@ -153,7 +152,6 @@ TEST(McmcDenseEMetric, gradients) {
TEST(McmcDenseEMetric, streams) {
stan::test::capture_std_streams();


Eigen::VectorXd q(2);
q(0) = 5;
q(1) = 1;
Expand Down
2 changes: 0 additions & 2 deletions src/test/unit/mcmc/hmc/hamiltonians/diag_e_metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ TEST(McmcDiagEMetric, sample_p) {
}

TEST(McmcDiagEMetric, gradients) {

Eigen::VectorXd q = Eigen::VectorXd::Ones(11);

stan::mcmc::diag_e_point z(q.size());
Expand Down Expand Up @@ -134,7 +133,6 @@ TEST(McmcDiagEMetric, gradients) {
TEST(McmcDiagEMetric, streams) {
stan::test::capture_std_streams();


Eigen::VectorXd q(2);
q(0) = 5;
q(1) = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ TEST(McmcSoftAbs, sample_p) {
}

TEST(McmcSoftAbs, gradients) {

Eigen::VectorXd q = Eigen::VectorXd::Ones(11);

stan::mcmc::softabs_point z(q.size());
Expand Down
1 change: 0 additions & 1 deletion src/test/unit/mcmc/hmc/hamiltonians/unit_e_metric_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ TEST(McmcUnitEMetric, sample_p) {
}

TEST(McmcUnitEMetric, gradients) {

Eigen::VectorXd q = Eigen::VectorXd::Ones(11);

stan::mcmc::unit_e_point z(q.size());
Expand Down
2 changes: 0 additions & 2 deletions src/test/unit/mcmc/hmc/integrators/expl_leapfrog2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <stan/services/util/create_rng.hpp>

TEST(McmcHmcIntegratorsExplLeapfrog, energy_conservation) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down Expand Up @@ -58,7 +57,6 @@ TEST(McmcHmcIntegratorsExplLeapfrog, energy_conservation) {
}

TEST(McmcHmcIntegratorsExplLeapfrog, symplecticness) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down
13 changes: 6 additions & 7 deletions src/test/unit/mcmc/hmc/integrators/expl_leapfrog_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// namespace
//************************************************************


class McmcHmcIntegratorsExplLeapfrogF : public testing::Test {
public:
McmcHmcIntegratorsExplLeapfrogF()
Expand Down Expand Up @@ -43,12 +42,12 @@ class McmcHmcIntegratorsExplLeapfrogF : public testing::Test {
stan::callbacks::stream_logger logger;

// integrator under test
stan::mcmc::expl_leapfrog<
stan::mcmc::unit_e_metric<command_model_namespace::command_model, stan::rng_t> >
stan::mcmc::expl_leapfrog<stan::mcmc::unit_e_metric<
command_model_namespace::command_model, stan::rng_t> >
unit_e_integrator;

stan::mcmc::expl_leapfrog<
stan::mcmc::diag_e_metric<command_model_namespace::command_model, stan::rng_t> >
stan::mcmc::expl_leapfrog<stan::mcmc::diag_e_metric<
command_model_namespace::command_model, stan::rng_t> >
diag_e_integrator;

// model
Expand Down Expand Up @@ -445,8 +444,8 @@ TEST_F(McmcHmcIntegratorsExplLeapfrogF, evolve_9) {
TEST_F(McmcHmcIntegratorsExplLeapfrogF, streams) {
stan::test::capture_std_streams();

typedef stan::mcmc::expl_leapfrog<
stan::mcmc::unit_e_metric<command_model_namespace::command_model, stan::rng_t> >
typedef stan::mcmc::expl_leapfrog<stan::mcmc::unit_e_metric<
command_model_namespace::command_model, stan::rng_t> >
integrator;

EXPECT_NO_THROW(integrator i);
Expand Down
4 changes: 0 additions & 4 deletions src/test/unit/mcmc/hmc/integrators/impl_leapfrog2_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <sstream>

TEST(McmcHmcIntegratorsImplLeapfrog, unit_e_energy_conservation) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down Expand Up @@ -60,7 +59,6 @@ TEST(McmcHmcIntegratorsImplLeapfrog, unit_e_energy_conservation) {
}

TEST(McmcHmcIntegratorsImplLeapfrog, unit_e_symplecticness) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down Expand Up @@ -146,7 +144,6 @@ TEST(McmcHmcIntegratorsImplLeapfrog, unit_e_symplecticness) {
}

TEST(McmcHmcIntegratorsImplLeapfrog, softabs_energy_conservation) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down Expand Up @@ -194,7 +191,6 @@ TEST(McmcHmcIntegratorsImplLeapfrog, softabs_energy_conservation) {
}

TEST(McmcHmcIntegratorsImplLeapfrog, softabs_symplecticness) {

stan::io::empty_var_context data_var_context;

std::stringstream model_output;
Expand Down
25 changes: 14 additions & 11 deletions src/test/unit/mcmc/hmc/integrators/impl_leapfrog_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <test/test-models/good/mcmc/hmc/integrators/command.hpp>
#include <test/unit/util.hpp>


#include <gtest/gtest.h>

#include <sstream>
Expand Down Expand Up @@ -44,12 +43,12 @@ class McmcHmcIntegratorsImplLeapfrogF : public testing::Test {
stan::callbacks::stream_logger logger;

// integrator under test
stan::mcmc::impl_leapfrog<
stan::mcmc::unit_e_metric<command_model_namespace::command_model, stan::rng_t> >
stan::mcmc::impl_leapfrog<stan::mcmc::unit_e_metric<
command_model_namespace::command_model, stan::rng_t> >
unit_e_integrator;

stan::mcmc::impl_leapfrog<
stan::mcmc::diag_e_metric<command_model_namespace::command_model, stan::rng_t> >
stan::mcmc::impl_leapfrog<stan::mcmc::diag_e_metric<
command_model_namespace::command_model, stan::rng_t> >
diag_e_integrator;

stan::mcmc::impl_leapfrog<stan::mcmc::softabs_metric<
Expand Down Expand Up @@ -105,7 +104,8 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, softabs_begin_update_p) {
EXPECT_NEAR(z.g(0), 1.99987371079118, 1e-15);

// setup hamiltonian
stan::mcmc::softabs_metric<command_model_namespace::command_model, stan::rng_t>
stan::mcmc::softabs_metric<command_model_namespace::command_model,
stan::rng_t>
hamiltonian(*model);

// setup epsilon
Expand Down Expand Up @@ -171,7 +171,8 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, softabs_update_q) {
EXPECT_NEAR(z.g(0), 1.99987371079118, 1e-15);

// setup hamiltonian
stan::mcmc::softabs_metric<command_model_namespace::command_model, stan::rng_t>
stan::mcmc::softabs_metric<command_model_namespace::command_model,
stan::rng_t>
hamiltonian(*model);

// setup epsilon
Expand Down Expand Up @@ -237,7 +238,8 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, softabs_end_update_p) {
EXPECT_NEAR(z.g(0), 1.67264975797776, 1e-15);

// setup hamiltonian
stan::mcmc::softabs_metric<command_model_namespace::command_model, stan::rng_t>
stan::mcmc::softabs_metric<command_model_namespace::command_model,
stan::rng_t>
hamiltonian(*model);

// setup epsilon
Expand Down Expand Up @@ -559,7 +561,8 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, softabs_evolve) {
EXPECT_NEAR(z.g(0), 1.27097196280777, 1e-15);

// setup hamiltonian
stan::mcmc::softabs_metric<command_model_namespace::command_model, stan::rng_t>
stan::mcmc::softabs_metric<command_model_namespace::command_model,
stan::rng_t>
hamiltonian(*model);

// setup epsilon
Expand All @@ -583,8 +586,8 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, softabs_evolve) {
TEST_F(McmcHmcIntegratorsImplLeapfrogF, streams) {
stan::test::capture_std_streams();

typedef stan::mcmc::impl_leapfrog<
stan::mcmc::unit_e_metric<command_model_namespace::command_model, stan::rng_t> >
typedef stan::mcmc::impl_leapfrog<stan::mcmc::unit_e_metric<
command_model_namespace::command_model, stan::rng_t> >
integrator;

EXPECT_NO_THROW(integrator i);
Expand Down
5 changes: 2 additions & 3 deletions src/test/unit/variational/advi_messages_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <iostream>
#include <stan/services/util/create_rng.hpp>


class advi_test : public ::testing::Test {
public:
advi_test()
Expand Down Expand Up @@ -56,8 +55,8 @@ class advi_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_meanfield_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream log_stream_;
std::stringstream parameter_stream_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ TEST(advi_test, multivar_no_constraint_fullrank) {
cont_params(1) = 0.75;

// ADVI
stan::variational::advi<Model, stan::variational::normal_fullrank, stan::rng_t>
stan::variational::advi<Model, stan::variational::normal_fullrank,
stan::rng_t>
test_advi(my_model, cont_params, base_rng, n_monte_carlo_grad,
n_grad_samples, 100, 1);

Expand Down Expand Up @@ -152,7 +153,8 @@ TEST(advi_test, multivar_no_constraint_meanfield) {
cont_params(1) = 0.75;

// ADVI
stan::variational::advi<Model, stan::variational::normal_meanfield, stan::rng_t>
stan::variational::advi<Model, stan::variational::normal_meanfield,
stan::rng_t>
test_advi(my_model, cont_params, base_rng, n_monte_carlo_grad,
1e4, // absurdly high!
100, 1);
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/variational/eta_adapt_big_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class eta_adapt_big_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_meanfield_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream log_stream_;
stan::callbacks::stream_logger logger;
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/variational/eta_adapt_fail_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class eta_should_fail_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_meanfield_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream log_stream_;
stan::callbacks::stream_logger logger;
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/variational/eta_adapt_small_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class eta_adapt_small_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_meanfield_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream log_stream_;
stan::callbacks::stream_logger logger;
Expand Down
5 changes: 2 additions & 3 deletions src/test/unit/variational/gradient_warn_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <string>
#include <iostream>


class advi_test : public ::testing::Test {
public:
advi_test()
Expand Down Expand Up @@ -50,8 +49,8 @@ class advi_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_meanfield_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream message_stream_;
std::stringstream parameter_stream_;
Expand Down
4 changes: 2 additions & 2 deletions src/test/unit/variational/hier_logistic_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class advi_test : public ::testing::Test {

stan::variational::advi<stan_model, stan::variational::normal_meanfield,
stan::rng_t> *advi_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank, stan::rng_t>
*advi_fullrank_;
stan::variational::advi<stan_model, stan::variational::normal_fullrank,
stan::rng_t> *advi_fullrank_;
std::stringstream model_stream_;
std::stringstream message_stream_;
std::stringstream parameter_stream_;
Expand Down

0 comments on commit ebe8da2

Please sign in to comment.