Repository: metric-space-ai/metric (language: python)

Issue:
Remove BOOST
### Code
- [ ] Python
### Tests
- [x] dnn
- [x] image processing
- [x] space
- [x] correlation
- [x] distance
- [x] ensembles
- [x] mapping
- [x] sparsification
- [ ] transform
- [x] utils
- [x] wrapper
### Examples
- [x] Unused boost in cmake scripts
- [x] program options
- [ ] gil
- [x] zlib
### CI


Discussion / hints:

Fix patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4233f9b1..002555ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
 cmake_minimum_required(VERSION 3.12)
+
 if (POLICY CMP0025)
   cmake_policy(SET CMP0025 NEW)
 endif ()
@@ -22,9 +23,6 @@ if(CCACHE_PATH)
 endif(CCACHE_PATH)
 
 
-#if(UNIX) 
-#    append(CMAKE_CXX_FLAGS 
-#endif(UNIX)
 option(BUILD_TESTS "build tests" ON)
 
 if(CMAKE_SYSTEM_NAME MATCHES Windows)
@@ -37,27 +35,15 @@ if(CMAKE_SYSTEM_NAME MATCHES Windows)
     endif()
 endif()
 
-find_package(LAPACK)
-if(NOT LAPACK_FOUND)
-	set(BLA_VENDOR Intel10_64lp_seq)
-	message("Generic LAPACK not Found, trying Intel MKL")
-	if(NOT BLAS_ROOT)
-	     if(WIN32)
-		     set(BLAS_ROOT "C:/Program\ Files\ (x86)/IntelSWTools/compilers_and_libraries/windows/mkl/lib/intel64")
-	     endif()
-	endif()
-	find_package(LAPACK QUIET)
-endif()
 
+find_package(LAPACK REQUIRED)
 
 if(MSVC)
 	add_definitions("/w")
 endif()
 
 
-find_package(Boost REQUIRED unit_test_framework)
 include_directories(
-    ${Boost_INCLUDE_DIR}
     ${PROJECT_SOURCE_DIR}
 )
 
diff --git a/examples/correlation_examples/CMakeLists.txt b/examples/correlation_examples/CMakeLists.txt
index 55054ed3..879923c2 100644
--- a/examples/correlation_examples/CMakeLists.txt
+++ b/examples/correlation_examples/CMakeLists.txt
@@ -1,11 +1,3 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(correlation_examples)
-
-include_directories(
-    ${PROJECT_SOURCE_DIR}
-    )
-
 file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 
 file(COPY "assets" DESTINATION ".")
@@ -20,6 +12,5 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
 	add_executable(${exampleName} ${exampleSrc})
  
 	target_link_libraries(${exampleName} ${LAPACK_LIBRARIES})
-	set_target_properties(${exampleName} PROPERTIES CXX_STANDARD 17)
 
 endforeach(exampleSrc)
\ No newline at end of file
diff --git a/examples/distance_examples/CMakeLists.txt b/examples/distance_examples/CMakeLists.txt
index 63fbdd91..7192aade 100644
--- a/examples/distance_examples/CMakeLists.txt
+++ b/examples/distance_examples/CMakeLists.txt
@@ -1,16 +1,8 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(distance_examples)
-
 find_package(Boost)
 
-if(UNIX) 
-    find_package(Threads REQUIRED)
-endif(UNIX)
 
 include_directories(
-    ${PROJECT_SOURCE_DIR}
-    ${PROJECT_SOURCE_DIR}/../../3rdparty/jpeglib 
+    ${PROJECT_SOURCE_DIR}/../../3rdparty/jpeglib
     ) 
 	 
 include_directories(${Boost_INCLUDE_DIRS})  
@@ -19,7 +11,6 @@ file(COPY "assets" DESTINATION ".")
 
 file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) 
 find_package(JPEG)
-find_package(LAPACK)
 
 #Run through each source
 foreach(exampleSrc ${EXAMPLE_SRCS})
@@ -34,23 +25,10 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
  
 	#link to Boost libraries AND your targets and dependencies 
 	target_link_libraries(${exampleName} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES})
-	set_target_properties(${exampleName} PROPERTIES CXX_STANDARD 17)
-	if(UNIX) 
-		set(THREADS_PREFER_PTHREAD_FLAG ON)
-		set(CMAKE_CXX_FLAGS "-O3")
-
-		target_link_libraries(${exampleName} Threads::Threads)
-
-		target_compile_options(${exampleName} PRIVATE -pthread)
-		set_target_properties(${exampleName} PROPERTIES LINK_FLAGS -pthread) 
+	if(UNIX)
 		target_link_libraries(${exampleName} ${JPEG_LIBRARIES})
 	endif(UNIX)
 	
-	if(CMAKE_SYSTEM_NAME MATCHES Windows)
-		target_link_directories(${exampleName} PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-		target_link_libraries(${exampleName} PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-    endif()
-
 endforeach(exampleSrc)
 
 if(Boost_VERSION GREATER_EQUAL 107200)
diff --git a/examples/dnn_examples/CMakeLists.txt b/examples/dnn_examples/CMakeLists.txt
index bd626745..1ea9a287 100644
--- a/examples/dnn_examples/CMakeLists.txt
+++ b/examples/dnn_examples/CMakeLists.txt
@@ -1,6 +1,3 @@
-cmake_minimum_required(VERSION 3.10)
-project(dnn_example)
-
 find_package(BLAS)
 
 add_executable(dnn_example dnn_example.cpp)
diff --git a/examples/energies_examples/CMakeLists.txt b/examples/energies_examples/CMakeLists.txt
index 301cb482..a3c0ce84 100644
--- a/examples/energies_examples/CMakeLists.txt
+++ b/examples/energies_examples/CMakeLists.txt
@@ -1,24 +1,7 @@
-cmake_minimum_required(VERSION 3.10)
+find_package(Threads REQUIRED)
 
-project(energies_examples)
-
-
-include_directories(
-	${PROJECT_SOURCE_DIR}
-)
-	
 file(COPY "assets" DESTINATION ".")
-
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-	
-# for Visual Studio
-if(MSVC) 
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
-endif(MSVC) 
-
-
-file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) 
+file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 
 #Run through each source
 foreach(exampleSrc ${EXAMPLE_SRCS})
@@ -28,25 +11,7 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
 	
 	add_executable(${exampleName} ${exampleSrc})
 
-
-	if(UNIX)
-		target_compile_features(${exampleName} PUBLIC cxx_std_17)
-		target_compile_options(${exampleName} PRIVATE -pthread -O3)
-		set_target_properties(${exampleName} PROPERTIES LINK_FLAGS -pthread)
-	endif(UNIX)
-
-	find_package(LAPACK)
-
-
-	if(LAPACK_LIBRARIES)
-		target_link_libraries(${exampleName} PRIVATE ${LAPACK_LIBRARIES})	
-	endif(LAPACK_LIBRARIES)
-
-	if(CMAKE_SYSTEM_NAME MATCHES Windows)
-
-		target_link_directories(${exampleName} PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-		target_link_libraries(${exampleName} PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-	endif()
+	target_link_libraries(${exampleName} PRIVATE ${LAPACK_LIBRARIES} Threads::Threads)
 
 endforeach(exampleSrc)
 
diff --git a/examples/ensemble_examples/CMakeLists.txt b/examples/ensemble_examples/CMakeLists.txt
index c9ed2ce8..07ff96b8 100644
--- a/examples/ensemble_examples/CMakeLists.txt
+++ b/examples/ensemble_examples/CMakeLists.txt
@@ -1,20 +1,5 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(ensemble_examples)
-
-if(UNIX)
-    find_package(Threads REQUIRED)
-endif(UNIX)
-
-include_directories(
-    ${PROJECT_SOURCE_DIR}
-)
-
 file(COPY "assets" DESTINATION ".")
-
-find_package(LAPACK)
-
-file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) 
+file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 
 #Run through each source
 foreach(exampleSrc ${EXAMPLE_SRCS})
@@ -25,21 +10,6 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
 	#Add compile target
 	add_executable(${exampleName} ${exampleSrc})
  
-	if(CMAKE_SYSTEM_NAME MATCHES Windows)
-		target_link_directories(${exampleName} PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-		target_link_libraries(${exampleName} PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-	endif()
 	target_link_libraries(${exampleName} ${LAPACK_LIBRARIES})
-	set_target_properties(${exampleName} PROPERTIES CXX_STANDARD 17)	
-	
-	if(UNIX)
-		set(THREADS_PREFER_PTHREAD_FLAG ON)
-		set(CMAKE_CXX_FLAGS "-O3")
-
-		target_link_libraries(${exampleName} Threads::Threads)
-
-		target_compile_options(${exampleName} PRIVATE -pthread)
-		set_target_properties(${exampleName} PROPERTIES LINK_FLAGS -pthread)
-	endif(UNIX)
 
 endforeach(exampleSrc)
\ No newline at end of file
diff --git a/examples/laplacians_example/CMakeLists.txt b/examples/laplacians_example/CMakeLists.txt
index c6683e63..226970db 100644
--- a/examples/laplacians_example/CMakeLists.txt
+++ b/examples/laplacians_example/CMakeLists.txt
@@ -1,21 +1,2 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(laplacians_examples)
-
-include_directories(
-    ${PROJECT_SOURCE_DIR}
-    )
-
-find_package(LAPACK)
-
-#Run through each source
-
 add_executable(Laplacians_test Laplacians_test.cpp sparsification_test.cpp tests.cpp)
-target_link_libraries(Laplacians_test PRIVATE ${LAPACK_LIBRARIES})
-
-set_target_properties(Laplacians_test PROPERTIES CXX_STANDARD 17)
-
-if(CMAKE_SYSTEM_NAME MATCHES Windows)
-	target_link_directories(Laplacians_test PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(Laplacians_test PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-endif()
+target_link_libraries(Laplacians_test PRIVATE ${LAPACK_LIBRARIES})
\ No newline at end of file
diff --git a/examples/mapping_examples/CMakeLists.txt b/examples/mapping_examples/CMakeLists.txt
index da403a5d..5779c3f5 100644
--- a/examples/mapping_examples/CMakeLists.txt
+++ b/examples/mapping_examples/CMakeLists.txt
@@ -1,21 +1,9 @@
-cmake_minimum_required(VERSION 3.10)
+find_package(Threads REQUIRED)
 
-project(mapping_examples)
 
-
-include_directories(
-	${PROJECT_SOURCE_DIR} 
-    ${PROJECT_SOURCE_DIR}/../..
-)
-	 
 file(COPY "assets" DESTINATION ".")
 
-# for Visual Studio
-if(MSVC) 
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
-endif(MSVC)
 
- 
 # quantized_mappers / clustering
 add_executable(KMedoids_example quantized_mappers/clustering/KMedoids_example.cpp)
 add_executable(KMeans_example quantized_mappers/clustering/KMeans_example.cpp)
@@ -28,9 +16,6 @@ add_executable(HierarchicalClustering_example quantized_mappers/clustering/Hiera
 # quantized_mappers / classification
 add_executable(SVM_example quantized_mappers/classification/SVM_example.cpp)
 add_executable(C45_example quantized_mappers/classification/C45_example.cpp)
-if(UNIX)
-    target_compile_options(C45_example PRIVATE -pthread)
-endif(UNIX)
 
 # continious_mappers / clustering
 add_executable(SOM_example continious_mappers/clustering/SOM_example.cpp)
@@ -49,114 +34,26 @@ add_executable(KOC_MNIST_example KOC_MNIST_example.cpp)
 add_executable(reverse_diffusion_example reverse_diffusion_example.cpp)
 
 
-if(UNIX)
-	set_target_properties(KMedoids_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(KMeans_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(DBScan_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(AffinityPropagation_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(HierarchicalClustering_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(SVM_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(C45_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(SOM_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(SOM_2_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(SOM_3_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(PCFA_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(SOM_and_MNIST_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(ESN_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(auto_detect_metric_example PROPERTIES CXX_STANDARD 17)
-	set_target_properties(reverse_diffusion_example PROPERTIES CXX_STANDARD 17)
-
-	set_target_properties(kohonen_outliers_clustering_example PROPERTIES CXX_STANDARD 17)
-	target_compile_options(kohonen_outliers_clustering_example PRIVATE -pthread)
-	set_target_properties(kohonen_outliers_clustering_example PROPERTIES LINK_FLAGS -pthread)
-
-	set_target_properties(KOC_MNIST_example PROPERTIES CXX_STANDARD 17)
-	target_compile_options(KOC_MNIST_example PRIVATE -pthread)
-	set_target_properties(KOC_MNIST_example PROPERTIES LINK_FLAGS -pthread)
-endif(UNIX)
-
-find_package(LAPACK)
-
-
-if(LAPACK_LIBRARIES)
-	target_link_libraries(KMedoids_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(KMeans_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(DBScan_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(AffinityPropagation_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(HierarchicalClustering_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(SVM_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(C45_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(SOM_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(SOM_2_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(SOM_3_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(PCFA_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(SOM_and_MNIST_example PRIVATE ${LAPACK_LIBRARIES})	
-	target_link_libraries(ESN_example PRIVATE ${LAPACK_LIBRARIES})
-	target_link_libraries(auto_detect_metric_example PRIVATE ${LAPACK_LIBRARIES})
-	target_link_libraries(kohonen_outliers_clustering_example PRIVATE ${LAPACK_LIBRARIES})
-	target_link_libraries(KOC_MNIST_example PRIVATE ${LAPACK_LIBRARIES})
-	target_link_libraries(reverse_diffusion_example PRIVATE ${LAPACK_LIBRARIES})
-endif(LAPACK_LIBRARIES)
- 
-if(CMAKE_SYSTEM_NAME MATCHES Windows)
-
-	target_link_directories(KMedoids_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(KMedoids_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(KMeans_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(KMeans_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(DBScan_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(DBScan_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(AffinityPropagation_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(AffinityPropagation_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(HierarchicalClustering_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(HierarchicalClustering_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(SVM_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(SVM_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(C45_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(C45_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(SOM_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(SOM_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(SOM_2_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(SOM_2_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(SOM_3_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(SOM_3_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(PCFA_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(PCFA_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(SOM_and_MNIST_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(SOM_and_MNIST_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(ESN_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(ESN_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(auto_detect_metric_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(auto_detect_metric_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(kohonen_outliers_clustering_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(kohonen_outliers_clustering_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(KOC_MNIST_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(KOC_MNIST_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-
-	target_link_directories(reverse_diffusion_example PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(reverse_diffusion_example PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-endif()
-
-
-
-
-
-
-
-
+target_link_libraries(KMedoids_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(KMeans_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(DBScan_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(AffinityPropagation_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(HierarchicalClustering_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(SVM_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(C45_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(SOM_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(SOM_2_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(SOM_3_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(PCFA_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(SOM_and_MNIST_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(ESN_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(auto_detect_metric_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(kohonen_outliers_clustering_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(KOC_MNIST_example PRIVATE ${LAPACK_LIBRARIES})
+target_link_libraries(reverse_diffusion_example PRIVATE ${LAPACK_LIBRARIES})
+
+
+target_link_libraries(C45_example PRIVATE Threads::Threads)
+target_link_libraries(KOC_MNIST_example PRIVATE Threads::Threads)
+target_link_libraries(kohonen_outliers_clustering_example PRIVATE Threads::Threads)
 
diff --git a/examples/mapping_examples/continious_mappers/clustering/SOM_2_example.cpp b/examples/mapping_examples/continious_mappers/clustering/SOM_2_example.cpp
index 8c862c5d..d9ecc983 100644
--- a/examples/mapping_examples/continious_mappers/clustering/SOM_2_example.cpp
+++ b/examples/mapping_examples/continious_mappers/clustering/SOM_2_example.cpp
@@ -13,8 +13,8 @@ Copyright (c) 2019 Panda Team
 #include <chrono>
 
 #include "../../assets/json.hpp"
-#include "../../modules/mapping.hpp"
-#include "assets/mnist/mnist_reader.hpp"
+#include "modules/mapping.hpp"
+#include "../../assets/mnist/mnist_reader.hpp"
 
 
 using json = nlohmann::json;
diff --git a/examples/mapping_examples/continious_mappers/clustering/SOM_3_example.cpp b/examples/mapping_examples/continious_mappers/clustering/SOM_3_example.cpp
index c7a6a80e..6243c059 100644
--- a/examples/mapping_examples/continious_mappers/clustering/SOM_3_example.cpp
+++ b/examples/mapping_examples/continious_mappers/clustering/SOM_3_example.cpp
@@ -13,8 +13,8 @@ Copyright (c) 2019 Panda Team
 #include <chrono>
 
 #include "../../assets/json.hpp"
-#include "../../modules/mapping.hpp"
-#include "assets/mnist/mnist_reader.hpp"
+#include "modules/mapping.hpp"
+#include "../../assets/mnist/mnist_reader.hpp"
 
 
 using json = nlohmann::json;
diff --git a/examples/mapping_examples/continious_mappers/clustering/SOM_example.cpp b/examples/mapping_examples/continious_mappers/clustering/SOM_example.cpp
index 78e64f92..0ce9bed4 100644
--- a/examples/mapping_examples/continious_mappers/clustering/SOM_example.cpp
+++ b/examples/mapping_examples/continious_mappers/clustering/SOM_example.cpp
@@ -13,7 +13,7 @@ Copyright (c) 2019 Panda Team
 #include <chrono>
 
 #include "../../assets/json.hpp"
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 
 using json = nlohmann::json;
diff --git a/examples/mapping_examples/quantized_mappers/classification/C45_example.cpp b/examples/mapping_examples/quantized_mappers/classification/C45_example.cpp
index fa6af603..cdf70477 100644
--- a/examples/mapping_examples/quantized_mappers/classification/C45_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/classification/C45_example.cpp
@@ -11,7 +11,7 @@ Copyright (c) 2019 Panda Team
 #include <deque> // for Record test
 
 #include "../../assets/helpers.cpp" // csv reader
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 
 template <typename T>
diff --git a/examples/mapping_examples/quantized_mappers/classification/SVM_example.cpp b/examples/mapping_examples/quantized_mappers/classification/SVM_example.cpp
index f76086f5..0111d552 100644
--- a/examples/mapping_examples/quantized_mappers/classification/SVM_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/classification/SVM_example.cpp
@@ -10,7 +10,7 @@ Copyright (c) 2018 Panda Team
 #include <deque> // for Record test
 
 #include "../../assets/helpers.cpp" // csv reader
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 template <typename T>
 void vector_print(const std::vector<T> &vec)
diff --git a/examples/mapping_examples/quantized_mappers/clustering/AffinityPropagation_example.cpp b/examples/mapping_examples/quantized_mappers/clustering/AffinityPropagation_example.cpp
index b86d5937..5e1efc85 100644
--- a/examples/mapping_examples/quantized_mappers/clustering/AffinityPropagation_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/clustering/AffinityPropagation_example.cpp
@@ -6,9 +6,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
 Copyright (c) 2019 Panda Team
 */
 
-#include "../../modules/mapping.hpp"
-#include "../../modules/space/matrix.hpp"
-#include "../../modules/distance.hpp"
+#include "modules/mapping.hpp"
+#include "modules/space/matrix.hpp"
+#include "modules/distance.hpp"
 
 
 
diff --git a/examples/mapping_examples/quantized_mappers/clustering/DBScan_example.cpp b/examples/mapping_examples/quantized_mappers/clustering/DBScan_example.cpp
index 7f32b031..cfc5c1c2 100644
--- a/examples/mapping_examples/quantized_mappers/clustering/DBScan_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/clustering/DBScan_example.cpp
@@ -6,7 +6,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
 Copyright (c) 2019 Panda Team
 */
 
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 
 
diff --git a/examples/mapping_examples/quantized_mappers/clustering/HierarchicalClustering_example.cpp b/examples/mapping_examples/quantized_mappers/clustering/HierarchicalClustering_example.cpp
index 0019a115..8e8aa265 100644
--- a/examples/mapping_examples/quantized_mappers/clustering/HierarchicalClustering_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/clustering/HierarchicalClustering_example.cpp
@@ -6,8 +6,8 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
 Copyright (c) 2019 Panda Team
 */
 
-#include "../../modules/mapping.hpp"
-#include "../../modules/distance.hpp"
+#include "modules/mapping.hpp"
+#include "modules/distance.hpp"
 
 
 
diff --git a/examples/mapping_examples/quantized_mappers/clustering/KMeans_example.cpp b/examples/mapping_examples/quantized_mappers/clustering/KMeans_example.cpp
index 24556d34..9d3cf717 100644
--- a/examples/mapping_examples/quantized_mappers/clustering/KMeans_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/clustering/KMeans_example.cpp
@@ -6,7 +6,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
 Copyright (c) 2019 Panda Team
 */
 
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 
 
diff --git a/examples/mapping_examples/quantized_mappers/clustering/KMedoids_example.cpp b/examples/mapping_examples/quantized_mappers/clustering/KMedoids_example.cpp
index 6eba517b..048af052 100644
--- a/examples/mapping_examples/quantized_mappers/clustering/KMedoids_example.cpp
+++ b/examples/mapping_examples/quantized_mappers/clustering/KMedoids_example.cpp
@@ -5,7 +5,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Copyright (c) 2019 Panda Team
 */
-#include "../../modules/mapping.hpp"
+#include "modules/mapping.hpp"
 
 
 
diff --git a/examples/space_examples/CMakeLists.txt b/examples/space_examples/CMakeLists.txt
index 1335ebe2..53896df0 100644
--- a/examples/space_examples/CMakeLists.txt
+++ b/examples/space_examples/CMakeLists.txt
@@ -1,15 +1,7 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(space_examples)
+find_package(Threads REQUIRED)
 
 file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 
-
-# for Visual Studio
-if(MSVC)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
-endif(MSVC) 
- 
 #Run through each source
 foreach(exampleSrc ${EXAMPLE_SRCS})
 
@@ -19,13 +11,5 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
   #Add compile target
   add_executable(${exampleName} ${exampleSrc}) 
   
- 
-  set_target_properties(${exampleName} PROPERTIES CXX_STANDARD 17)
- 
-  if(UNIX)
-    target_compile_options(${exampleName} PRIVATE -pthread)
-    target_link_libraries(${exampleName} ${LAPACK_LIBRARIES})
-    set_target_properties(${exampleName} PROPERTIES LINK_FLAGS -pthread) 
-  endif(UNIX)
-
+  target_link_libraries(${exampleName} ${LAPACK_LIBRARIES} Threads::Threads)
 endforeach(exampleSrc)
diff --git a/examples/transform_examples/CMakeLists.txt b/examples/transform_examples/CMakeLists.txt
index deec8933..09d9465e 100644
--- a/examples/transform_examples/CMakeLists.txt
+++ b/examples/transform_examples/CMakeLists.txt
@@ -1,13 +1,4 @@
-cmake_minimum_required(VERSION 3.10)
-
-project(transform_examples)
-
 find_package(Threads)
-find_package(LAPACK)
-
-include_directories(
-    ${PROJECT_SOURCE_DIR}
-    )
 
 file(GLOB EXAMPLE_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
 
@@ -22,11 +13,8 @@ foreach(exampleSrc ${EXAMPLE_SRCS})
 	#Add compile target
 	add_executable(${exampleName} ${exampleSrc}) 
  
-	target_link_libraries(${exampleName} Threads::Threads)
-    if(LAPACK_LIBRARIES)
-		target_link_libraries(${exampleName} ${LAPACK_LIBRARIES})
-	endif(LAPACK_LIBRARIES)
-	set_target_properties(${exampleName} PROPERTIES CXX_STANDARD 17)
+	target_link_libraries(${exampleName} ${LAPACK_LIBRARIES})
+
 	if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
 	    target_link_libraries(${exampleName} stdc++fs)
 	endif()
diff --git a/modules/utils/ThreadPool.hpp b/modules/utils/ThreadPool.hpp
index 0448aa43..18c4d174 100644
--- a/modules/utils/ThreadPool.hpp
+++ b/modules/utils/ThreadPool.hpp
@@ -8,6 +8,7 @@
 #include <mutex>
 #include <condition_variable>
 #include <atomic>
+#include <list>
 
 class ThreadPool {
 public:
@@ -15,8 +16,8 @@ class ThreadPool {
     ThreadPool(size_t maxThreads);
     void execute(const callable &block);
     void close();
-    size_t getQueueSize() const { return queue_.size(); }
-    size_t getThreadsCount() const { return threads_.size(); }
+	size_t getThreadsCount() const { return threads_.size(); }
+	size_t getQueueSize() const { return queue_.size(); }
 
 private:
     class CloseException : public std::exception {};


Test patch:
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 5277cf3d..0315c884 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,7 +1,3 @@
-include_directories( ${PROJECT_SOURCE_DIR} )
-
-
-
 add_subdirectory(correlation_tests)
 add_subdirectory(dnn_tests)
 add_subdirectory(ensembles_tests)
diff --git a/tests/distance_tests/CMakeLists.txt b/tests/distance_tests/CMakeLists.txt
index 9527362a..480eee1e 100644
--- a/tests/distance_tests/CMakeLists.txt
+++ b/tests/distance_tests/CMakeLists.txt
@@ -19,67 +19,4 @@ catch_discover_tests(entropy_vmixing_tests)
 catch_discover_tests(kohonen_distance_tests)
 catch_discover_tests(kolmogorov_smirnov_tests)
 catch_discover_tests(random_emd_tests)
-catch_discover_tests(reimannian_test)
-
-#[[
-cmake_minimum_required(VERSION 3.10)
-
-enable_testing()
-
-find_package(Boost)
-
-project(distance_tests)
-
-find_package(Boost COMPONENTS unit_test_framework REQUIRED)
-find_package(LAPACK)
-
-include_directories(
-	${PROJECT_SOURCE_DIR} 
-	${PROJECT_SOURCE_DIR}/../..
-    ${Boost_INCLUDE_DIRS}
-	)	
-
-# for Visual Studio
-if(MSVC) 
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")  
-endif(MSVC)
-
-# file(COPY "assets" DESTINATION ".") 
-
-if(UNIX)
-    set(THREADS_PREFER_PTHREAD_FLAG ON)
-    find_package(Threads REQUIRED)
-endif(UNIX)
-
-AUX_SOURCE_DIRECTORY(. TEST_SRCS)
-#Run through each source
-foreach(testSrc ${TEST_SRCS}) 
-
-    #Extract the filename without an extension (NAME_WE)
-    get_filename_component(testName ${testSrc} NAME_WE)
-
-    #Add compile target
-    add_executable(${testName} ${testSrc})
-
-	target_link_libraries(${testName} PRIVATE ${Boost_LIBRARIES} ${LAPACK_LIBRARIES})
-	set_target_properties(${testName} PROPERTIES CXX_STANDARD 17)
- 
-	#link to Boost libraries AND your targets and dependencies 
-	if(CMAKE_SYSTEM_NAME MATCHES Windows)
-	    target_link_directories(${testName} PRIVATE ${BOOST_LINK_DIRS} ${Boost_LIBRARY_DIRS})
-	
-		target_link_directories(${testName} PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-		target_link_libraries(${testName} PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-	endif()
-	if(UNIX)
-		target_compile_options(${testName} PRIVATE -DBOOST_TEST_DYN_LINK)
-		target_link_libraries(${testName} PRIVATE Threads::Threads)
-	endif(UNIX)
-        #I like to move testing binaries into a testBin directory
-#        set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_CURRENT_SOURCE_DIR})
-        #Finally add it to test execution - 
-        #Notice the WORKING_DIRECTORY and COMMAND
-        add_test(NAME ${testName} COMMAND ${testName})
-
-endforeach(testSrc)
-]]
+catch_discover_tests(reimannian_test)
\ No newline at end of file
diff --git a/tests/dnn_tests/CMakeLists.txt b/tests/dnn_tests/CMakeLists.txt
index 8a28fa70..042eaa62 100644
--- a/tests/dnn_tests/CMakeLists.txt
+++ b/tests/dnn_tests/CMakeLists.txt
@@ -1,5 +1,3 @@
-find_package(BLAS)
-
 add_executable(dnn_tests dnn_tests.cpp)
 target_link_libraries(dnn_tests PRIVATE Catch2::Catch2)
 
diff --git a/tests/ensembles_tests/CMakeLists.txt b/tests/ensembles_tests/CMakeLists.txt
index 01e2376c..2a7f5909 100644
--- a/tests/ensembles_tests/CMakeLists.txt
+++ b/tests/ensembles_tests/CMakeLists.txt
@@ -3,34 +3,3 @@ add_executable(ensemble_tests ensemble_tests.cpp)
 target_link_libraries(ensemble_tests PRIVATE Catch2::Catch2)
 
 catch_discover_tests(ensemble_tests)
-
-#[[
-find_package (Boost COMPONENTS unit_test_framework serialization REQUIRED)
-include_directories(
-    ${PROJECT_SOURCE_DIR}
-    ${Boost_INCLUDE_DIRS}
-    )
-
-
-AUX_SOURCE_DIRECTORY(. TEST_SRCS)
-
-#Run through each source
-foreach(testSrc ${TEST_SRCS})
-        #Extract the filename without an extension (NAME_WE)
-        get_filename_component(testName ${testSrc} NAME_WE)
-
-        #Add compile target
-        add_executable(${testName} ${testSrc})
-
-        #link to Boost libraries AND your targets and dependencies
-        target_link_libraries(${testName} ${Boost_LIBRARIES})
-        target_link_libraries(${testName} ${LAPACK_LIBRARIES})
-        #I like to move testing binaries into a testBin directory
-        set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_CURRENT_SOURCE_DIR})
-        #Finally add it to test execution - 
-        #Notice the WORKING_DIRECTORY and COMMAND
-        add_test(NAME ${testName} 
-                 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 
-                 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${testName} )
-endforeach(testSrc)
-]]
diff --git a/tests/mapping_tests/CMakeLists.txt b/tests/mapping_tests/CMakeLists.txt
index bd41890b..a16a1af9 100644
--- a/tests/mapping_tests/CMakeLists.txt
+++ b/tests/mapping_tests/CMakeLists.txt
@@ -5,77 +5,4 @@ target_link_libraries(kohonen_outliers_clustering_tests PRIVATE Catch2::Catch2)
 target_link_libraries(mapping_tests PRIVATE Catch2::Catch2)
 
 catch_discover_tests(kohonen_outliers_clustering_tests)
-catch_discover_tests(mapping_tests)
-
-#[[
-cmake_minimum_required(VERSION 3.10)
-
-enable_testing()
-
-find_package(Boost COMPONENTS unit_test_framework)
-find_package(LAPACK)
-
-project(mapping_tests)
-
-include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/../..)
-
-# for Visual Studio
-if(MSVC)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
-endif(MSVC)
-
-if(NOT UNIX)
-    set(BOOST_LINK_DIRS "${BOOST_ROOT}/stage/lib")
-endif()
-
-# mapping tests
-add_executable(mapping_tests mapping_tests.cpp)
-
-target_include_directories(mapping_tests PRIVATE ${Boost_INCLUDE_DIRS})
-target_link_libraries(mapping_tests PRIVATE ${Boost_LIBRARIES})
-if(CMAKE_SYSTEM_NAME MATCHES Windows)
-    target_link_directories(mapping_tests PRIVATE ${BOOST_LINK_DIRS})
-endif()
-
-if(UNIX)
-    set(THREADS_PREFER_PTHREAD_FLAG ON)
-    find_package(Threads REQUIRED)
-    set_target_properties(mapping_tests PROPERTIES CXX_STANDARD 17)
-    target_compile_options(mapping_tests PRIVATE -DBOOST_TEST_DYN_LINK)
-    target_link_libraries(mapping_tests PRIVATE ${LAPACK_LIBRARIES})
-endif(UNIX)
-
-add_test(NAME mapping_tests COMMAND mapping_tests)
-
-# KOC tests
-
-add_executable(koc_tests kohonen_outliers_clustering_tests.cpp)
-
-target_include_directories(koc_tests PRIVATE ${Boost_INCLUDE_DIRS})
-target_link_libraries(koc_tests PRIVATE ${Boost_LIBRARIES})
-if(CMAKE_SYSTEM_NAME MATCHES Windows)
-    target_link_directories(koc_tests PRIVATE ${BOOST_LINK_DIRS})
-endif()
-
-
-if(UNIX)
-	set_target_properties(koc_tests PROPERTIES CXX_STANDARD 17)
-	target_compile_options(koc_tests PRIVATE -pthread)
-	set_target_properties(koc_tests PROPERTIES LINK_FLAGS -pthread)
-endif(UNIX)
-
-if(LAPACK_LIBRARIES)
-	target_link_libraries(koc_tests PRIVATE ${LAPACK_LIBRARIES})	
-endif(LAPACK_LIBRARIES)
- 
-if(CMAKE_SYSTEM_NAME MATCHES Windows)
-	target_link_directories(koc_tests PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-	target_link_libraries(koc_tests PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-	target_link_libraries(koc_tests PRIVATE ${Boost_LIBRARIES})
-endif()
-
-add_test(NAME koc_tests COMMAND mapping_tests)
-
-#
-
-]]
+catch_discover_tests(mapping_tests)
\ No newline at end of file
diff --git a/tests/space_tests/CMakeLists.txt b/tests/space_tests/CMakeLists.txt
index 6f2c674c..2699915d 100644
--- a/tests/space_tests/CMakeLists.txt
+++ b/tests/space_tests/CMakeLists.txt
@@ -1,24 +1,3 @@
-cmake_minimum_required(VERSION 3.10)
-
-
-#find_package(Boost COMPONENTS serialization system REQUIRED)
-
-#find_package(LAPACK)
-
-#include_directories(
-#		${PROJECT_SOURCE_DIR}
-#		${PROJECT_SOURCE_DIR}/../..
-#		${Boost_INCLUDE_DIRS}
-#)
-
-#set(BOOST_LINK_DIRS "${BOOST_ROOT}/stage/lib")
-
-#if (UNIX)
-#	set(THREADS_PREFER_PTHREAD_FLAG ON)
-#	find_package(Threads REQUIRED)
-#endif (UNIX)
-
-
 add_executable(knn_graph_tests knn_graph_tests.cpp)
 add_executable(space_matrix_tests space_matrix_tests.cpp)
 add_executable(space_tree_tests space_tree_tests.cpp)
@@ -29,50 +8,4 @@ target_link_libraries(space_tree_tests Catch2::Catch2)
 
 catch_discover_tests(knn_graph_tests)
 catch_discover_tests(space_matrix_tests)
-catch_discover_tests(space_tree_tests)
-
-#AUX_SOURCE_DIRECTORY(. TEST_SRCS)
-##Run through each source
-#foreach (testSrc ${TEST_SRCS})
-#
-#	#Extract the filename without an extension (NAME_WE)
-#	get_filename_component(testName ${testSrc} NAME_WE)
-#
-#	#Add compile target
-#	add_executable(${testName} ${testSrc})
-#
-#	if (${testSrc} matches knn_graph_test.cpp)
-#		sdsd
-#	else()
-#
-#	endif()
-#
-#	#link to Boost libraries AND your targets and dependencies
-#
-#	target_include_directories(${testName} PRIVATE ${Boost_INCLUDE_DIRS})
-#	target_link_libraries(${testName} PRIVATE ${Boost_LIBRARIES})
-#	target_link_libraries(${testName} PRIVATE ${BOOST_TEST_LIB})
-#
-#	if (LAPACK_LIBRARIES)
-#		target_link_libraries(${testName} PRIVATE ${LAPACK_LIBRARIES})
-#	endif (LAPACK_LIBRARIES)
-#
-#	if (CMAKE_SYSTEM_NAME MATCHES Windows)
-#		target_link_directories(${testName} PRIVATE ${PROJECT_SOURCE_DIR}/../../mkl/lib/intel64_win)
-#		target_link_libraries(${testName} PRIVATE mkl_core.lib mkl_sequential.lib mkl_intel_lp64.lib)
-#		target_link_libraries(${testName} PRIVATE ${Boost_LIBRARIES})
-#		target_link_directories(${testName} PRIVATE ${BOOST_LINK_DIRS})
-#	endif ()
-#
-#	if (UNIX)
-#		target_link_libraries(${testName} PRIVATE Threads::Threads)
-#		target_compile_options(${testName} PRIVATE -DBOOST_TEST_DYN_LINK)
-#	endif (UNIX)
-#
-#	#I like to move testing binaries into a testBin directory
-#	#        set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_CURRENT_SOURCE_DIR})
-#	#Finally add it to test execution -
-#	#Notice the WORKING_DIRECTORY and COMMAND
-#	add_test(NAME ${testName}
-#			COMMAND ${testName})
-#endforeach (testSrc)
+catch_discover_tests(space_tree_tests)
\ No newline at end of file