Skip to content
Snippets Groups Projects
Commit 5677e740 authored by Caron Olivier's avatar Caron Olivier
Browse files

update Doxygen file

parent a0dc36f7
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -16,12 +16,15 @@ project(MH_Builder)
enable_language(C)
enable_language(CXX)
#set(CMAKE_C_COMPILER "/usr/bin/clang-15")
#set(CMAKE_CXX_COMPILER "/usr/bin/clang++-15")
# Set your compilation options ("-g" for debug)
set(CMAKE_CXX_FLAGS "-std=c++20 -Wall -Wextra -DWITHOUT_NUMPY")
add_compile_options(-Wno-overloaded-virtual)
# For debug/release specific flags
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -g --coverage -fprofile-arcs -ftest-coverage -lgcov")
......
This diff is collapsed.
......@@ -8,3 +8,5 @@
# Then use ${NAME}
file(GLOB_RECURSE SRC_LIST ${PROJECT_SOURCE_DIR} *.h)
......@@ -93,7 +93,7 @@ namespace core {
* @return
*/
virtual OUT operator()([[maybe_unused]] IN &_in, [[maybe_unused]] Criterion<IN> &_criterion) {
throw std::runtime_error("Algorithm.h : operator(const IN, criterion) is not implemented !");
throw std::runtime_error("Algorithm.h : operator(IN, criterion) is not implemented !");
}
/**
......
......@@ -58,15 +58,15 @@ namespace representation::permutation::neighborhood::neighbor {
*/
void move(SOL &sol) override {
auto n = sol.size();
double trouve=false;
unsigned long long int deb_B, deb_C, deb_D ; // start index for segments B,C,D (A always equals to 0)
auto found=false;
unsigned long long int deb_B=1, deb_C=2, deb_D=3 ; // start index for segments B,C,D (A always equals to 0)
unsigned long long int cpt=-1 ;
// find deb_B,deb_C,deb_D indexes that delimits segments A,B,C,D of sol according to current key
for (unsigned long long int _deb_B =1 ; _deb_B <=(n-3) &&!trouve; _deb_B++)
for (unsigned long long int _deb_C=_deb_B+1; _deb_C<=(n-2)&& !trouve;_deb_C++)
for (unsigned long long int _deb_D=_deb_C+1; _deb_D<=(n-1) &&!trouve;_deb_D++) {
for (unsigned long long int _deb_B =1 ; _deb_B <=(n-3) &&!found; _deb_B++)
for (unsigned long long int _deb_C=_deb_B+1; _deb_C<=(n-2)&& !found;_deb_C++)
for (unsigned long long int _deb_D=_deb_C+1; _deb_D<=(n-1) &&!found;_deb_D++) {
cpt++ ;
if (this->key == cpt ) { trouve = true; deb_B= _deb_B ; deb_C=_deb_C; deb_D=_deb_D ; }
if (this->key == cpt ) { found = true; deb_B= _deb_B ; deb_C=_deb_C; deb_D=_deb_D ; }
}
// before move { B, C, D} deb_X designates the start index of segment X (deb_A = 0)
std::rotate(sol.begin()+deb_B,sol.begin()+deb_D,sol.end()); // move segment D after segment A: { A,C,D,B}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment