Skip to content

Commit

Permalink
Fixed inv_metric access in test (Issue #2881)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbales2 committed Oct 30, 2020
1 parent 7889b27 commit f8b5be7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/unit/mcmc/hmc/integrators/impl_leapfrog_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@ TEST_F(McmcHmcIntegratorsImplLeapfrogF, evolve_9) {
z.q(0) = 1.27097196280777;
z.p(0) = -0.159996782671291;
z.g(0) = 1.27097196280777;
z.get_inv_metric()(0) = 0.733184698671436;
Eigen::VectorXd inv_metric(1);
inv_metric << 0.733184698671436;
z.set_inv_metric(inv_metric);
EXPECT_NEAR(z.V, 0.807684865121721, 1e-15);
EXPECT_NEAR(z.q(0), 1.27097196280777, 1e-15);
EXPECT_NEAR(z.p(0), -0.159996782671291, 1e-15);
Expand Down

0 comments on commit f8b5be7

Please sign in to comment.