Menu

Tree [a17d46] master /
 History

HTTPS access


File Date Author Commit
 Catch2 2021-09-26 yahya-mohammed07 yahya-mohammed07 [0c946d] `Catch2` header only
 docs 2022-03-11 yahya-mohammed07 yahya-mohammed07 [cb5c5c] notes about `numeric.hpp`
 source 2022-03-11 yahya-mohammed07 yahya-mohammed07 [02d2f9] redundant `inline` removed and `median` func added
 tests 2022-03-11 yahya-mohammed07 yahya-mohammed07 [e993e5] tests about `median` added
 CMakeLists.txt 2022-02-19 yahya-mohammed07 yahya-mohammed07 [c44632] -
 CODE_OF_CONDUCT.md 2021-09-11 yahya-mohammed07 yahya-mohammed07 [d3f429] Code of Conduct
 CONTRIBUTING.md 2021-09-11 yahya-mohammed07 yahya-mohammed07 [2494a3] Contributing to Kraken
 LICENSE 2021-09-24 yahya-mohammed07 yahya-mohammed07 [33597f] changed to `MIT` license
 README.md 2022-03-11 yahya-mohammed07 yahya-mohammed07 [38b022] README
 TODO.md 2022-02-19 yahya-mohammed07 yahya-mohammed07 [0e3ba7] TODO

Read Me

Kraken 🐙

Codacy Badge

Table of Contents

Introduction

  • Kraken is a modern math library written in a way that gives accurate results, compile time checks and simplicity.

Requirement

  • c++20 or later
  • Tested on:

    • g++10 std=c++2a
    • g++11 std=c++2a
    • clang++12 std=c++2a
    • clang++11 std=c++2a
    • clang++10 std=c++2a
  • Catch2 for testing

contents

  • A matrix_<> class. For more info check: about_matrix

  • namespace kraken which 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.

Installation

Download

  • A simple way is to download this library from github as zip then unzip it 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.

All

  • If you downloaded it as zip and unzipped it, then in the unzipped library the root of the header folder hierarchy is Kraken-master/source/library.

  • copy the library folder from the unzipped archive to your working directory as Kraken and include it this way.

  • ```cpp
    #include "Kraken/all.hpp"
    #include <iostream></iostream>

using namespace kraken;

auto main()
-> int
{
std::cout << constants::pi << '\n';
}
```

Debian

  • If you downloaded it as zip and unzipped it, then in the unzipped library the root of the header folder hierarchy is Kraken-master/source/library.

  • I.e. there is a Kraken-master/source/library/all.hpp header, which is the one that you want the compiler to find as <kraken all.hpp="">.</kraken>

  • copy the library folder from the unzipped archive, to a folder that your compiler searches for headers.

And that folder is :-

/usr/include

The procedure :-

  • Ui version
  • if you're using nautilus file manager
    • open terminal then do sudo apt install nautilus-admin then when it's done do nautilus -q.
  • if your're using nemo no need to install anything run as-administer is built-in.

  • open usr/include folder as administrator.

  • paste library folder into usr/include, then rename library into Kraken. 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 library folder into usr/include, then rename library into Kraken. you're done!.

windows

  • If you downloaded it as zip and unzipped it, then in the unzipped library the root of the header folder hierarchy is Kraken-master/source/library.

  • I.e. there is a Kraken-master/source/library/all.hpp header, which is the one that you want the compiler to find as <kraken all.hpp="">.</kraken>

  • copy the library folder 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 library folder inside, then rename library into Kraken. 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 library folder inside, then rename library into Kraken. you're done!

Check if the library is working by running this code:-

  • ```cpp
    #include <kraken all.hpp="">
    #include <iostream></iostream></kraken>

using namespace kraken;

auto main()
-> int
{
std::cout << constants::pi << '\n';
}
```

in case if you want to use the library with Apology system:-

  • ``cpp #define APOLOGY // define this macro before includingKraken`
    #include <kraken all.hpp="">
    #include <iostream></iostream></kraken>

using namespace kraken;

auto main()
-> int
{
std::cout << constants::pi << '\n';
}
```