Skip to content

willat343/mathbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mathbox

A general purpose math library based on Eigen. It is currently a header-only library.

Core C++ Library

Prerequisites

Dependency Version Description
Eigen3 >= 3.3 Linear Algebra Package

Installation

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

Uninstallation

cd build
sudo make uninstall

Usage

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

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

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.

Catkin Support

A package.xml is supplied to facilitate an isolated installation within a catkin workspace (e.g. for ROS applications).

Prerequisites

Prerequisites of core C++ library plus the following:

Dependency Version Description
catkin - catkin build system

Installation

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

Uninstallation

cd /path/to/catkin_ws
catkin clean mathbox

Usage

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

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

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

About

General purpose math library based on Eigen

Resources

Stars

Watchers

Forks

Packages

No packages published