From 8afe4d022c5a63a3fdd8d23f659ca3eca12e500b Mon Sep 17 00:00:00 2001 From: vgnecula Date: Wed, 5 Jun 2024 13:28:59 -0400 Subject: [PATCH] H-Poly Test for Reflections in Gaussian HMC --- include/generators/h_polytopes_generator.h | 2 +- test/gaussian_hmc_reflections_test.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/generators/h_polytopes_generator.h b/include/generators/h_polytopes_generator.h index dae44bdca..dc21c8e0d 100644 --- a/include/generators/h_polytopes_generator.h +++ b/include/generators/h_polytopes_generator.h @@ -9,7 +9,7 @@ #define H_POLYTOPES_GEN_H #include - +#include #ifndef isnan using std::isnan; diff --git a/test/gaussian_hmc_reflections_test.cpp b/test/gaussian_hmc_reflections_test.cpp index 1e54ca19a..5ed4497ef 100644 --- a/test/gaussian_hmc_reflections_test.cpp +++ b/test/gaussian_hmc_reflections_test.cpp @@ -6,7 +6,7 @@ #include "cartesian_geom/cartesian_kernel.h" #include "convex_bodies/hpolytope.h" #include "generators/known_polytope_generators.h" -//#include "generators/h_polytopes_generator.h" // Include your polytope generator +#include "generators/h_polytopes_generator.h" // Include your polytope generator #include "random_walks/random_walks.hpp" #include "misc/misc.h" #include "doctest.h" @@ -25,9 +25,9 @@ void test_gaussian_hmc_reflections(const std::string& polytope_type, RNGType& rn P = generate_cross(dim, false); } else if (polytope_type == "simplex") { P = generate_simplex(dim, false); - } /*else if (polytope_type == "random") { - P = random_hpoly(dim, m); - } */ else { + } else if (polytope_type == "random") { + P = random_hpoly(dim, m, 123456); + } else { std::cout << "Unknown polytope type: " << polytope_type << std::endl; return; } @@ -58,8 +58,8 @@ TEST_CASE("GHMC Reflections Test - Simplex") { RNGType rng(123456); test_gaussian_hmc_reflections("simplex", rng, 10); } -/* + TEST_CASE("GHMC Reflections Test - Random Polytope") { RNGType rng(123456); test_gaussian_hmc_reflections("random", rng, 10, 3, 30); // 3D polytope with 30 hyperplanes -}*/ \ No newline at end of file +} \ No newline at end of file