Skip to content

Commit

Permalink
H-Poly Test for Reflections in Gaussian HMC
Browse files Browse the repository at this point in the history
  • Loading branch information
vgnecula committed Jun 5, 2024
1 parent 4da54e0 commit 8afe4d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/generators/h_polytopes_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define H_POLYTOPES_GEN_H

#include <exception>

#include <chrono>

#ifndef isnan
using std::isnan;
Expand Down
12 changes: 6 additions & 6 deletions test/gaussian_hmc_reflections_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -25,9 +25,9 @@ void test_gaussian_hmc_reflections(const std::string& polytope_type, RNGType& rn
P = generate_cross<Polytope>(dim, false);
} else if (polytope_type == "simplex") {
P = generate_simplex<Polytope>(dim, false);
} /*else if (polytope_type == "random") {
P = random_hpoly<Polytope, RNGType>(dim, m);
} */ else {
} else if (polytope_type == "random") {
P = random_hpoly<Polytope, boost::mt19937>(dim, m, 123456);
} else {
std::cout << "Unknown polytope type: " << polytope_type << std::endl;
return;
}
Expand Down Expand Up @@ -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
}*/
}

0 comments on commit 8afe4d0

Please sign in to comment.