- mcpp (Math for C Plus Plus) is cross platform, templated math library that can be used without compiling .
- It is targeted towards engineers and mathematicians.
- Used with a very simple and intuitive syntax inspired from Python libraries such as sympy, numpy, scipy .. etc
- By only including
mcpp.hpp
file you get all the functions with their implementations into your code - Unit testing is done using Google test
- Main targeted math sectors :
- Algebra
- Statistics
- Calculus
- Vectors
- Signal systems
- There is NO NEED FOR COMPILING just include the header files right away.
- You can use the compiling procedure to install everything to your standard path
- The compiling procedure is only used for the test scripts
- Tested Platforms
- Linux Ubuntu 18.04
- macOS 10.13 with xcode 9.4.1
- Windows 10 version 1809
- Dependencies
- cmake version 3.13 or higher
- GNU c++ compiler version 6.1 ot higher (C++ 14 features)
- GNU make version 4.1 or higher
- Run the following script or follow the steps below (this will install the header files into your system)
cd scripts
chmod 755 linux.sh
./linux.sh # Will also install new version of cmake
- Cmake new version (if needed)
CMAKE_URL="https://cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz"
mkdir cmake && wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
- Build
mkdir build
cd build
# or use ../cmake/bin/cmake .. -DNO-TEST=True
cmake .. -DNO-TEST=True
make
sudo make install # (this will install the header files into your system)
- Run the following script or follow the steps below (this will install the header files into your system)
cd scripts
chmod 755 macos.sh
./macos.sh
- Normal build
mkdir build
cd build
cmake .. -DNO-TEST=True
make
sudo make install # (this will install the header files into your system)
- Run the following script or follow the steps below (this will install the header files into your system)
.\windows.ps1
- Install chocolatey (if not installed)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- Install C++ compilers (if needed)
choco install mingw
choco install cmake
choco install make
choco install gsudo
- Building
mkdir build
cd build
cmake -G "Unix Makefiles" .. -DNO-TEST=True
make
sudo make install # (this will install the header files into your system)
- Enable Unit tests
cmake .. -DNO-TEST=False
-
Non standard path install (means didn't use cmake install)
#include "includes/mcpp.hpp"
-
Standard path install
#include <mcpp.hpp>
-
Please see the full documentation for detailed usage on the classes and functions