Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ volestipy.egg-info
venv
lp_solve_5.5/
.devcontainer/
.github/dependabot.yml
.github/dependabot.yml.venv/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.19
4 changes: 2 additions & 2 deletions dingo/PolytopeSampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def generate_steady_states_no_multiphase(
"""A member function to sample steady states.

Keyword arguments:
method -- An MCMC method to sample, i.e. {'billiard_walk', 'cdhr', 'rdhr', 'ball_walk', 'dikin_walk', 'john_walk', 'vaidya_walk', 'gaussian_hmc_walk', 'exponential_hmc_walk', 'hmc_leapfrog_gaussian', 'hmc_leapfrog_exponential'}
method -- An MCMC method to sample, i.e. {'billiard_walk', 'cdhr', 'rdhr', 'ball_walk', 'dikin_walk', 'john_walk', 'vaidya_walk', 'gaussian_hmc_walk', 'exponential_hmc_walk', 'hmc_leapfrog_gaussian', 'hmc_leapfrog_exponential', 'shake_and_bake', 'billiard_shake_and_bake'}
n -- the number of steady states to sample
burn_in -- the number of points to burn before sampling
thinning -- the walk length of the chain
Expand Down Expand Up @@ -223,7 +223,7 @@ def sample_from_polytope_no_multiphase(
Keyword arguments:
A -- an mxn matrix that contains the normal vectors of the facets of the polytope row-wise
b -- a m-dimensional vector, s.t. A*x <= b
method -- An MCMC method to sample, i.e. {'billiard_walk', 'cdhr', 'rdhr', 'ball_walk', 'dikin_walk', 'john_walk', 'vaidya_walk', 'gaussian_hmc_walk', 'exponential_hmc_walk', 'hmc_leapfrog_gaussian', 'hmc_leapfrog_exponential'}
method -- An MCMC method to sample, i.e. {'billiard_walk', 'cdhr', 'rdhr', 'ball_walk', 'dikin_walk', 'john_walk', 'vaidya_walk', 'gaussian_hmc_walk', 'exponential_hmc_walk', 'hmc_leapfrog_gaussian', 'hmc_leapfrog_exponential', 'shake_and_bake', 'billiard_shake_and_bake'}
n -- the number of steady states to sample
burn_in -- the number of points to burn before sampling
thinning -- the walk length of the chain
Expand Down
8 changes: 8 additions & 0 deletions dingo/bindings/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ double HPolytopeCPP::apply_sampling(int walk_len,
} else if (strcmp(method, "vaidya_walk")) { // vaidya walk
uniform_sampling<VaidyaWalk>(rand_points, HP, rng, walk_len, number_of_points,
starting_point, number_of_points_to_burn);
} else if (strcmp(method, "shake_and_bake") == 0) { // shake and bake walk
auto [boundary_pt, facet_idx] = compute_boundary_point<Point>(HP, rng, static_cast<FT>(1e-10));
shakeandbake_sampling<ShakeAndBakeWalk>(rand_points,HP, rng, walk_len,number_of_points,
boundary_pt,number_of_points_to_burn, facet_idx);
} else if (strcmp(method, "billiard_shake_and_bake") == 0) { // billiard shake and bake walk
auto [boundary_pt, facet_idx] = compute_boundary_point<Point>(HP, rng, static_cast<FT>(1e-10));
billiard_shakeandbake_sampling<BilliardShakeAndBakeWalk>(randPoints, P, rng, walkL,nreflections, numpoints,
StartingPoint, nburns, facet_index);
} else if (strcmp(method, "mmcs")) { // vaidya walk
MT S;
int total_ess;
Expand Down
1 change: 1 addition & 0 deletions dingo/bindings/bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <chrono>
#include "sampling/sampling.hpp"
#include "ode_solvers/ode_solvers.hpp"
#include "preprocess/feasible_point.hpp"

// for rounding
#include "preprocess/min_sampling_covering_ellipsoid_rounding.hpp"
Expand Down
2 changes: 1 addition & 1 deletion dingo/volestipy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cdef extern from "bindings.h":
# Lists with the methods supported by volesti for volume approximation and random walk
volume_methods = ["sequence_of_balls".encode("UTF-8"), "cooling_gaussian".encode("UTF-8"), "cooling_balls".encode("UTF-8")]
walk_methods = ["uniform_ball".encode("UTF-8"), "CDHR".encode("UTF-8"), "RDHR".encode("UTF-8"), "gaussian_ball".encode("UTF-8"), \
"gaussian_CDHR".encode("UTF-8"), "gaussian_RDHR".encode("UTF-8"), "uniform_ball".encode("UTF-8"), "billiard".encode("UTF-8")]
"gaussian_CDHR".encode("UTF-8"), "gaussian_RDHR".encode("UTF-8"), "uniform_ball".encode("UTF-8"), "billiard".encode("UTF-8"),"shake_and_bake".encode("UTF-8"),"billiard_shake_and_bake".encode("UTF-8") ]
rounding_methods = ["min_ellipsoid".encode("UTF-8"), "svd".encode("UTF-8"), "max_ellipsoid".encode("UTF-8")]

# Build the HPolytope class
Expand Down
2 changes: 1 addition & 1 deletion eigen
Submodule eigen updated from 02f420 to 5e8edd
2 changes: 1 addition & 1 deletion volesti
Submodule volesti updated 47 files
+0 −66 .circleci/config.yml
+11 −6 .github/workflows/R-CMD-check-macOS.yml
+0 −2 .github/workflows/R-CMD-check-ubuntu.yml
+1 −6 .github/workflows/cmake-clang.yml
+0 −4 .github/workflows/cmake-gcc.yml
+2 −1 .gitignore
+48 −0 CITATION.cff
+3 −3 CONTRIBUTING.md
+4 −5 README.md
+1 −1 docs/getting_started/cpp_example.md
+0 −35 examples/optimization_spectrahedra/Boost.cmake
+8 −8 examples/optimization_spectrahedra/CMakeLists.txt
+0 −30 examples/optimization_spectrahedra/Eigen.cmake
+5 −9 examples/sampling-hpolytope-with-billiard-walks/sampler.cpp
+103 −0 examples/sb_sampling/CMakeLists.txt
+31 −0 examples/sb_sampling/README.md
+97 −0 examples/sb_sampling/sbtest.py
+159 −0 examples/sb_sampling/shakeandbake.cpp
+3 −1 external/PackedCSparse/FloatArray.h
+1 −1 external/cmake-files/Boost.cmake
+1 −1 external/cmake-files/Eigen.cmake
+2 −0 external/cmake-files/LPSolve.cmake
+80 −43 include/convex_bodies/hpolytope.h
+15 −0 include/convex_bodies/spectrahedra/spectrahedron.h
+121 −0 include/diagnostics/scaling_ratio.hpp
+6 −6 include/ode_solvers/implicit_midpoint.hpp
+2 −2 include/optimization/sliding_window.hpp
+7 −7 include/preprocess/barrier_center_ellipsoid.hpp
+18 −18 include/preprocess/crhmc/crhmc_problem.h
+38 −0 include/preprocess/feasible_point.hpp
+13 −12 include/preprocess/inscribed_ellipsoid_rounding.hpp
+4 −2 include/preprocess/max_inscribed_ellipsoid.hpp
+21 −0 include/preprocess/rounding_util_functions.hpp
+133 −0 include/random_walks/accelerated_billiard_walk_utils.hpp
+6 −1 include/random_walks/boltzmann_hmc_walk.hpp
+2 −2 include/random_walks/crhmc/crhmc_walk.hpp
+86 −37 include/random_walks/gaussian_accelerated_billiard_walk.hpp
+167 −0 include/random_walks/shake_and_bake_walk.hpp
+31 −131 include/random_walks/uniform_accelerated_billiard_walk.hpp
+27 −0 include/sampling/random_point_generators.hpp
+34 −0 include/sampling/sampling.hpp
+6 −4 include/volume/volume_cooling_nonspherical_gaussians_crhmc.hpp
+5 −1 test/CMakeLists.txt
+4 −4 test/benchmarks_crhmc.cpp
+24 −5 test/sampling_test.cpp
+90 −0 test/shake_and_bake_test.cpp
+9 −9 test/test_internal_points.cpp