GraphColoring Algorithm Backtracking https://en.wikipedia.org/wiki/Graph_coloring
https://godbolt.org/z/9Y9dcn7rd
- c++20 compiler
GCC:
cd src
g++ -std=c++20 main.cpp -o main
CLANG:
clang++ -std=c++20 main.cpp -o main
MSVC
Open Visual Studio Developer Command Prompt https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022
cd src
cl /std:c++20 /EHsc main.cpp
git clone https://github.com/raigorx/GraphColoring.git
cd GraphColoring
cmake -B build
cmake --build build
Test are made using google test https://google.github.io/googletest/ and they are build via cmake same process as above.
You can run them via cmake:
cd GraphColoring/build
ctest
Or directly
cd src
./main_test