Skip to content

Commit

Permalink
Refactor/eliminate include directives (GeomScale#244)
Browse files Browse the repository at this point in the history
* correcting the includes to point the boost library directory

* modifs to include only the include/ and external/ directories

* modifs

* Update CMakeLists.txt

---------

Co-authored-by: Vissarion Fisikopoulos <[email protected]>
Co-authored-by: vfisikop <[email protected]>
  • Loading branch information
3 people authored and TolisChal committed Jul 8, 2024
1 parent 24828cd commit 493d64d
Show file tree
Hide file tree
Showing 24 changed files with 152 additions and 124 deletions.
7 changes: 4 additions & 3 deletions include/integration/simple_MC_integration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
#include <fstream>
#include <random>
#include <vector>
#include "convex_bodies/hpolytope.h"

#include "Eigen/Eigen"
#include "convex_bodies/hpolytope.h"
#include "generators/known_polytope_generators.h"
#include "boost_random_number_generator.hpp"
#include "generators/boost_random_number_generator.hpp"
#include "cartesian_geom/cartesian_kernel.h"
#include "random_walks/random_walks.hpp"
#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "misc.h"
#include "misc/misc.h"

typedef double NT;
typedef Cartesian<NT> Kernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define MIN_ELLIPSOID_ROUNDING_HPP

#include <Eigen/Eigen>
#include "khach.h"
#include "minimum_ellipsoid/khach.h"
#include "sampling/random_point_generators.hpp"
#include "volume/sampling_policies.hpp"

Expand Down
15 changes: 0 additions & 15 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ if (USE_MKL)
find_library(GFORTRAN NAME libgfortran.dylib PATHS /usr/local/Cellar/gcc/10.2.0_4/lib/gcc/10)
find_library(LAPACK NAME liblapack.dylib PATHS /usr/lib)
find_library(OPENMP NAME libiomp5.dylib PATHS /opt/intel/oneapi/compiler/2021.1.1/mac/compiler/lib)

include_directories (BEFORE ${MKLROOT}/include)
set(PROJECT_LIBS ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} ${GFORTRAN_LIBRARIES})
set(MKL_LINK "-L${MKLROOT}/lib -Wl,-rpath,${MKLROOT}/lib -lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl")
Expand All @@ -163,21 +162,7 @@ else()
endif(USE_MKL)

include_directories (BEFORE ../external)
include_directories (BEFORE ../external/minimum_ellipsoid)
include_directories (BEFORE ../include/generators)
include_directories (BEFORE ../include/volume)
include_directories (BEFORE ../include)
include_directories (BEFORE ../include/integration)
include_directories (BEFORE ../include/convex_bodies)
include_directories (BEFORE ../include/convex_bodies/spectrahedra)
include_directories (BEFORE ../include/annealing)
include_directories (BEFORE ../include/ode_solvers)
include_directories (BEFORE ../include/root_finders)
include_directories (BEFORE ../include/samplers)
include_directories (BEFORE ../include/lp_oracles)
include_directories (BEFORE ../include/nlp_oracles)
include_directories (BEFORE ../include/misc)
include_directories (BEFORE ../test)

#for Eigen
if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
Expand Down
2 changes: 1 addition & 1 deletion test/benchmarks_cb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"

#include "exact_vols.h"
#include "volume/exact_vols.h"
#include "generators/known_polytope_generators.h"

int main()
Expand Down
2 changes: 1 addition & 1 deletion test/benchmarks_cg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"

#include "exact_vols.h"
#include "volume/exact_vols.h"
#include "generators/known_polytope_generators.h"

int main()
Expand Down
2 changes: 1 addition & 1 deletion test/benchmarks_sob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"

#include "exact_vols.h"
#include "volume/exact_vols.h"
#include "generators/known_polytope_generators.h"

int main()
Expand Down
9 changes: 5 additions & 4 deletions test/boundary_oracles_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
#include "Eigen/Eigen"
#include "doctest.h"

#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"
#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "random_walks/random_walks.hpp"
#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
Expand Down
12 changes: 7 additions & 5 deletions test/logconcave_sampling_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
#include "doctest.h"
#include "Eigen/Eigen"

#include "ode_solvers.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "ode_solvers/ode_solvers.hpp"
#include "diagnostics/diagnostics.hpp"

#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"
#include "random_walks/random_walks.hpp"
#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
Expand Down
14 changes: 8 additions & 6 deletions test/max_ellipsoid_rounding_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"

#include "random_walks/random_walks.hpp"

Expand All @@ -22,7 +24,7 @@

#include "preprocess/max_inscribed_ellipsoid_rounding.hpp"

#include "known_polytope_generators.h"
#include "generators/known_polytope_generators.h"

template <typename NT>
NT factorial(NT n)
Expand Down
14 changes: 8 additions & 6 deletions test/mcmc_diagnostics_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"

#include "random_walks/random_walks.hpp"

#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "known_polytope_generators.h"
#include "generators/known_polytope_generators.h"
#include "sampling/sampling.hpp"

#include "diagnostics/effective_sample_size.hpp"
Expand Down
13 changes: 7 additions & 6 deletions test/new_rounding_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"
#include "random_walks/random_walks.hpp"

#include "volume/volume_sequence_of_balls.hpp"
Expand All @@ -24,7 +25,7 @@
#include "preprocess/max_inscribed_ellipsoid_rounding.hpp"
#include "preprocess/svd_rounding.hpp"

#include "known_polytope_generators.h"
#include "generators/known_polytope_generators.h"

template <typename NT>
NT factorial(NT n)
Expand Down
12 changes: 8 additions & 4 deletions test/new_volume_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@
#include "Eigen/Eigen"
//#define VOLESTI_DEBUG
#include <fstream>


#include <boost/random.hpp>
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>


#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "volume/rotating.hpp"
#include "misc/misc.h"
#include "misc/linear_extensions.h"
#include "sampling/sampling.hpp"
#include "exact_vols.h"
#include "volume/exact_vols.h"
#include "generators/known_polytope_generators.h"
#include "generators/z_polytopes_generators.h"

Expand Down
14 changes: 8 additions & 6 deletions test/ode_solvers_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
#include <unistd.h>
#include <vector>

#include "Eigen/Eigen"
#include "doctest.h"

#include "Eigen/Eigen"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "generators/known_polytope_generators.h"
#include "ode_solvers.hpp"
#include "ode_solvers/ode_solvers.hpp"
#include "preprocess/crhmc/crhmc_input.h"
#include "preprocess/crhmc/crhmc_problem.h"
#include "random.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_int.hpp"
#include "random/uniform_real_distribution.hpp"
#include "random_walks/random_walks.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
Expand Down
15 changes: 11 additions & 4 deletions test/order_polytope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@
#include "doctest.h"
#include <fstream>
#include <iostream>


#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "cartesian_geom/cartesian_kernel.h"
#include "cartesian_geom/point.h"
#include "poset.h"
#include "orderpolytope.h"
#include "misc.h"
#include "random.hpp"
#include "convex_bodies/orderpolytope.h"
#include "misc/poset.h"
#include "misc/misc.h"



template <typename NT>
Expand Down
15 changes: 9 additions & 6 deletions test/sampling_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,19 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"



#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"
#include "random_walks/random_walks.hpp"

#include "volume/volume_sequence_of_balls.hpp"
#include "known_polytope_generators.h"
#include "generators/known_polytope_generators.h"
#include "sampling/sampling.hpp"

#include "diagnostics/univariate_psrf.hpp"
Expand Down
12 changes: 7 additions & 5 deletions test/simple_mc_integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
// Link to the Latte-Integrale Software: https://www.math.ucdavis.edu/~latte/software.php
// Link to the tests: https://github.com/surajchoubey/latte-integrale-checks

#include <vector>
#include <iostream>
#include <fstream>

#include "doctest.h"
#include "simple_MC_integration.hpp"

#include "Eigen/Eigen"
#include <vector>
#include "integration/simple_MC_integration.hpp"
#include "cartesian_geom/cartesian_kernel.h"
#include "convex_bodies/hpolytope.h"
#include "generators/known_polytope_generators.h"
#include "ode_solvers/oracle_functors.hpp"
#include "random_walks/random_walks.hpp"
#include <iostream>
#include <fstream>
#include "misc.h"
#include "misc/misc.h"

template <typename NT>
NT exp_normsq(Point X) {
Expand Down
14 changes: 8 additions & 6 deletions test/volume_cb_hpolytope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"

#include "random_walks/random_walks.hpp"

#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "known_polytope_generators.h"
#include "generators/known_polytope_generators.h"

template <typename NT>
NT factorial(NT n)
Expand Down
16 changes: 9 additions & 7 deletions test/volume_cb_vpoly_intersection_vpoly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
#include "doctest.h"
#include <fstream>
#include <iostream>
#include "misc.h"
#include "random.hpp"
#include "random/uniform_int.hpp"
#include "random/normal_distribution.hpp"
#include "random/uniform_real_distribution.hpp"

#include <boost/random.hpp>
#include <boost/random/uniform_int.hpp>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>

#include "misc/misc.h"

#include "random_walks/random_walks.hpp"

#include "volume/volume_sequence_of_balls.hpp"
#include "volume/volume_cooling_gaussians.hpp"
#include "volume/volume_cooling_balls.hpp"
#include "known_polytope_generators.h"

#include "v_polytopes_generators.h"
#include "generators/known_polytope_generators.h"
#include "generators/v_polytopes_generators.h"

template <typename NT>
NT factorial(NT n)
Expand Down
Loading

0 comments on commit 493d64d

Please sign in to comment.