A general purpose math library based on Eigen. It is currently a header-only library.
Dependency | Version | Description |
---|---|---|
Eigen3 | >= 3.3 | Linear Algebra Package |
It is recommended that you configure with ccmake
(sudo apt install cmake-curses-gui
) to see the various options. Otherwise use cmake
instead of ccmake
and set flags manually.
cd mathbox
mkdir build && cd build
ccmake ..
make -j
sudo make install
cd build
sudo make uninstall
Import the package into your project and add the dependency to your target <target>
with:
find_package(mathbox REQUIRED)
target_link_libraries(<target> <PUBLIC|INTERFACE|PRIVATE> ${mathbox_LIBRARIES})
target_include_directories(<target> SYSTEM <PUBLIC|INTERFACE|PRIVATE> ${mathbox_INCLUDE_DIRS})
For more information, see mathbox/README.md and documentation.
Documentation must be turned on by setting the -DBUILD_DOCUMENTATION=ON
cmake argument.
To view the HTML documentation, open the build/docs/html/index.html
file.
To view the LaTeX documentation, build it with:
cd build/docs/latex
make
Then open the file refman.pdf
.
Tests must be turned on by setting the -DBUILD_TESTS=ON
cmake argument.
cd build
cmake -DBUILD_TESTS=ON ..
make -j
They can then be run with ctest
:
ctest --test-dir test
For more explicit output, the test executables can be run directly from the build directory.
A package.xml
is supplied to facilitate an isolated installation within a catkin workspace (e.g. for ROS applications).
Prerequisites of core C++ library plus the following:
Dependency | Version | Description |
---|---|---|
catkin | - | catkin build system |
Clone or symlink the repository to the workspace's src
directory, for example:
ln -s /path/to/mathbox /path/to/catkin_ws/src
cd /path/to/catkin_ws
catkin build mathbox
cd /path/to/catkin_ws
catkin clean mathbox
To use the package in a downstream project, one should add to their package.xml
:
<depend>mathbox</depend>
One can then either use the workspace's isolated installation or use the system installation otherwise.
Importing the dependency is then exactly the same as it would be in a non-catkin package as described above (do NOT rely on the catkin
variables like catkin_LIBRARIES
and catkin_INCLUDE_DIRS
).
Documentation must be turned on by setting the -DBUILD_DOCUMENTATION=ON
cmake argument. This can be done in catkin with:
catkin config --cmake-args -DBUILD_DOCUMENTATION=ON
Tests must be turned on by setting the -DBUILD_TESTS=ON
cmake argument. This can be done in catkin with:
catkin config --cmake-args -DBUILD_TESTS=ON