Kraken is an open-source modern math library that comes with a fast-fixed matrix class and math-related functions.

Kraken 🐙

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 presented as symbols, just like in julia.
    • 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.

  • #include "Kraken/all.hpp"
    #include <iostream>
    
    using namespace kraken;
    
    auto main()
        -> int
    {
      std::cout << constants::Ī€ << '\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>.

  • 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>.

  • 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:-

  • #include <Kraken/all.hpp>
    #include <iostream>
    
    using namespace kraken;
    
    auto main()
        -> int
    {
      std::cout << constants::Ī€ << '\n';
    }

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

  • #define APOLOGY   // define this macro before including `Kraken`  
    #include <Kraken/all.hpp>
    #include <iostream>
    
    using namespace kraken;
    
    auto main()
        -> int
    {
      std::cout << constants::Ī€ << '\n';
    }
Owner
yahya mohammed
learning, exploring and sharing.
yahya mohammed
Similar Resources

a lean linear math library, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions

linmath.h -- A small library for linear math as required for computer graphics linmath.h provides the most used types required for programming compute

Sep 18, 2022

linalg.h is a single header, public domain, short vector math library for C++

linalg.h linalg.h is a single header, public domain, short vector math library for C++. It is inspired by the syntax of popular shading and compute la

Sep 23, 2022

đŸ“Ŋ Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C

đŸ“Ŋ Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C

Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. cglm provides lot of utils to help math operations to be fast and quick to write. It is community friendly, feel free to bring any issues, bugs you faced.

Sep 17, 2022

Simple long integer math library for C++

SLIMCPP Simple long integer math library for C++ SLIMCPP is C++ header-only library that implements long integers that exceed maximum size of native t

Aug 2, 2022

Math library using hlsl syntax with SSE/NEON support

Math library using hlsl syntax with SSE/NEON support

HLSL++ Small header-only math library for C++ with the same syntax as the hlsl shading language. It supports any SSE (x86/x64 devices like PC, Mac, PS

Sep 14, 2022

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)

KFR - Fast, modern C++ DSP framework Compiler support: https://www.kfr.dev KFR is an open source C++ DSP framework that focuses on high performance (s

Sep 19, 2022

MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

MIRACL What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic Library – the MIRACL Crypto SDK – is a C software library that is

Sep 20, 2022

tiny recursive descent expression parser, compiler, and evaluation engine for math expressions

tiny recursive descent expression parser, compiler, and evaluation engine for math expressions

TinyExpr TinyExpr is a very small recursive descent parser and evaluation engine for math expressions. It's handy when you want to add the ability to

Sep 19, 2022

C++ class for creating and computing arbitrary-length integers

BigNumber BigNumber is a C++ class that allows for the creation and computation of arbitrary-length integers. The maximum possible length of a BigNumb

Sep 13, 2022
C++ header-only fixed-point math library

fpm A C++ header-only fixed-point math library. "fpm" stands for "fixed-point math". It is designed to serve as a drop-in replacement for floating-poi

Sep 22, 2022
A simple C++ complex & real matrix library, with matrix inversion, left division and determinant calculation

NaiveMatrixLib 帆帆įš„įŽ€æ˜“įŸŠé˜ĩ莥įŽ—åē“ A simple C++ stdlib-based complex & real matrix library, with matrix inversion, left division (A\b) and determinant calculat

Apr 27, 2022
A matrix header-only library, uses graphs internally, helpful when your matrix is part of a simulation where it needs to grow many times (or auto expand)

GraphMat Header-only Library Matrix implemented as a graph, specially for the use case when it should be auto expanding at custom rate, specially in s

Oct 25, 2021
A modern, C++20-native, single-file header-only dense 2D matrix library.
A modern, C++20-native, single-file header-only dense 2D matrix library.

A modern, C++20-native, single-file header-only dense 2D matrix library. Contents Example usage creating matrices basic operations row, col, size, sha

Aug 4, 2022
Fast math tool written on asm/c

math_tool fast math tool written on asm/c This project was created for easy use of mathematical / geometric rules and operations. This project contain

Mar 8, 2022
nml is a simple matrix and linear algebra library written in standard C.

nml is a simple matrix and linear algebra library written in standard C.

Sep 12, 2022
Library for nonconvex constrained optimization using the augmented Lagrangian method and the matrix-free PANOC algorithm.

alpaqa Alpaqa is an efficient implementation of the Augmented Lagrangian method for general nonlinear programming problems, which uses the first-order

Aug 9, 2022
Minimal matrix implementation in C++

min-matrix Minimal matrix implementation in C++. ?? Pull Request ?? ?? Post Issues ?? Brief ?? Eigen compiles too slow? ?? ?? Just want something simp

Dec 17, 2021
Some out-of-core matrix operations via HDF5.

hdfmat Version: 0.2-2 License: BSD 2-Clause Author: Drew Schmidt This package provides some out-of-core matrix operations via HDF5. The main purpose o

Jan 9, 2022
A Code Base for Matrix operations in C++

SimpM A Code Base for Matrix operations in C++ Dependencies: GNU Bignum Library: https://gmplib.org Needed to be installed on you computer. Check your

Dec 27, 2021