Krakenis a modern math library written in a way that gives accurate results, compile time checks and simplicity.
-
c++20 or later
- Tested on:
- g++10 std=c++2a
- g++11 std=c++2a
- g++13
- clang++12 std=c++2a
- clang++11 std=c++2a
- clang++10 std=c++2a
- Tested on:
-
Catch2 for testing
-
A matrix_<> class. For more info check: about_matrix
-
namespace
krakenwhich has:-- namespace
constants: contains mathematical and physical constants. - namespace
cal: contains functions that do some calculations. - namespace
op: contains variadic function objects. - and a bonus namespace!
num_methods: contains implementation of some numerical methods.
- namespace
- Download
- Adding the library to the intended path so the compiler can recognize it
- A simple way is to download this library from
githubaszipthenunzipit maybe using your os built-in unzip tool but the preferred way is to use PeaZip for windows and linux, for mac you can use keka.
-
If you downloaded it as
zipand unzipped it, then in the unzipped library the root of the header folder hierarchy isKraken-master/source/library. -
copy the
libraryfolder from the unzipped archive to your working directory asKrakenand include it this way. -
#include "Kraken/all.hpp" #include <iostream> using namespace kraken; auto main() -> int { std::cout << constants::pi << '\n'; }
-
If you downloaded it as
zipand unzipped it, then in the unzipped library the root of the header folder hierarchy isKraken-master/source/library. -
I.e. there is a
Kraken-master/source/library/all.hppheader, which is the one that you want the compiler to find as <Kraken/all.hpp>. -
copy the
libraryfolder from the unzipped archive, to a folder that your compiler searches for headers.
And that folder is :-
/usr/include
-
Ui version
- if you're using
nautilusfile manager- open terminal then do
sudo apt install nautilus-adminthen when it's done donautilus -q.
- open terminal then do
- if your're using
nemono need to install anythingrun as-administeris built-in.
- if you're using
-
open
usr/includefolder asadministrator. -
paste
libraryfolder intousr/include, then renamelibraryintoKraken. you're done!. -
Terminal version
- if you have any file manger installed you can open a folder as administer as follows:
sudo(your-file-manager)/usr/include - paste
libraryfolder intousr/include, then renamelibraryintoKraken. you're done!.
- if you have any file manger installed you can open a folder as administer as follows:
-
If you downloaded it as
zipand unzipped it, then in the unzipped library the root of the header folder hierarchy isKraken-master/source/library. -
I.e. there is a
Kraken-master/source/library/all.hppheader, which is the one that you want the compiler to find as <Kraken/all.hpp>. -
copy the
libraryfolder from the unzipped archive, to a folder that your compiler searches for headers. -
for the MinGW g++ compiler you might have a folder such as
C:\installed\mingw\nuwen\MinGW (version)\include
-
just paste the
libraryfolder inside, then renamelibraryintoKraken. you're done! -
for the Visual C++ compiler you might have a folder such as
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\ (version) \include
-
just paste the
libraryfolder inside, then renamelibraryintoKraken. you're done!
-
#include <Kraken/all.hpp> #include <iostream> using namespace kraken; auto main() -> int { std::cout << constants::pi << '\n'; }