qtm-calc-shared is a shared version of qtm-calc intended for use via CMake.
-
First of all make sure you have the Boost library installed on your system (see more Boost installation on Windows or Boost installation on *nix);
-
Clone this project and then cd to the project folder;
-
Configure the project using CMake:
$ cmake -B ./build -G <preferred generator> -DCMAKE_BUILD_TYPE=<Debug|Release>
- Then run build command:
$ cmake --build ./build --config <Debug|Release>
- You've done! The builded binary file available in the build directory.
In your CMakelists.txt:
cmake_minimum_required(VERSION 3.12)
project(project_name LANGUAGES CXX)
add_subdirectory(/path/to/qtm-calc/dir EXCLUDE_FROM_ALL)
add_executable(executable_name main.cpp)
target_link_libraries(executable_name PRIVATE libqtmcalc)
In your sources:
#include <qtm-calc/core.hpp>
#include <qtm-calc/data.hpp>
// somewhere in code
qtm::qtm x(10, 1, 1.5, 0.7, 0, -1);
if (x.is_fs_outdated()) {
x.calc_final_states();
}
std::cout << x.final_states();
// ...
This project is licensed under the MIT License.
This project is used by gw-dss-cpp - predict tool based on queuing theory.
My thanks to the developers of the Boost C++ Libraries and pybind11.
Especial thanks to IceArrow256 and Vemestael for help in writing computing algorithms and code structuring.