From e12bf7c16aa5da0c85f03fa42be7f3dd43e33a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Fri, 22 Nov 2024 11:44:42 +0100 Subject: [PATCH] Begin mdlp reintegration --- CMakeLists.txt | 9 +++++---- Makefile | 2 +- bayesnet/CMakeLists.txt | 2 +- bayesnet/classifiers/Proposal.h | 2 +- lib/mdlp | 1 + sample/sample.cc | 2 +- tests/TestModulesVersions.cc | 2 +- tests/TestUtils.h | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) create mode 160000 lib/mdlp diff --git a/CMakeLists.txt b/CMakeLists.txt index e2b1a32..32beaa9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,12 +65,13 @@ endif (ENABLE_CLANG_TIDY) # External libraries - dependencies of BayesNet # --------------------------------------------- -find_library(FImdlp NAMES libfimdlp.a REQUIRED) -find_path(FImdlp_INCLUDE_DIRS REQUIRED NAMES fimdlp) +# find_library(FImdlp NAMES libfimdlp.a REQUIRED) +# find_path(FImdlp_INCLUDE_DIRS REQUIRED NAMES fimdlp) -message(STATUS "FImdlp=${FImdlp}") -message(STATUS "FImdlp_INCLUDE_DIRS=${FImdlp_INCLUDE_DIRS}") +# message(STATUS "FImdlp=${FImdlp}") +# message(STATUS "FImdlp_INCLUDE_DIRS=${FImdlp_INCLUDE_DIRS}") +add_git_submodule("lib/mdlp") # include(FetchContent) add_git_submodule("lib/json") diff --git a/Makefile b/Makefile index 80fc852..39cf001 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ setup: ## Install dependencies for tests and coverage fi @echo "* You should install plantuml & graphviz for the diagrams" -diagrams: ## Create an UML class diagram & depnendency of the project (diagrams/BayesNet.png) +diagrams: ## Create an UML class diagram & dependency of the project (diagrams/BayesNet.png) @which $(plantuml) || (echo ">>> Please install plantuml"; exit 1) @which $(dot) || (echo ">>> Please install graphviz"; exit 1) @which $(clang-uml) || (echo ">>> Please install clang-uml"; exit 1) diff --git a/bayesnet/CMakeLists.txt b/bayesnet/CMakeLists.txt index 21e767d..845c72c 100644 --- a/bayesnet/CMakeLists.txt +++ b/bayesnet/CMakeLists.txt @@ -10,4 +10,4 @@ include_directories( file(GLOB_RECURSE Sources "*.cc") add_library(BayesNet ${Sources}) -target_link_libraries(BayesNet ${FImdlp} "${TORCH_LIBRARIES}") +target_link_libraries(BayesNet mdlp "${TORCH_LIBRARIES}") diff --git a/bayesnet/classifiers/Proposal.h b/bayesnet/classifiers/Proposal.h index 26118bf..dd011d8 100644 --- a/bayesnet/classifiers/Proposal.h +++ b/bayesnet/classifiers/Proposal.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include "bayesnet/network/Network.h" #include "Classifier.h" diff --git a/lib/mdlp b/lib/mdlp new file mode 160000 index 0000000..7d62d6a --- /dev/null +++ b/lib/mdlp @@ -0,0 +1 @@ +Subproject commit 7d62d6af4a6ca944a3bbde0b61f651fd4b2d3f57 diff --git a/sample/sample.cc b/sample/sample.cc index 9c067d0..478ff85 100644 --- a/sample/sample.cc +++ b/sample/sample.cc @@ -5,7 +5,7 @@ // *************************************************************** #include -#include +#include #include std::vector discretizeDataset(std::vector& X, mdlp::labels_t& y) diff --git a/tests/TestModulesVersions.cc b/tests/TestModulesVersions.cc index 98ebb2d..fdcaa05 100644 --- a/tests/TestModulesVersions.cc +++ b/tests/TestModulesVersions.cc @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #define TO_STR2(x) #x diff --git a/tests/TestUtils.h b/tests/TestUtils.h index e93b689..652680b 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include