lubeck 1.5.4
High level linear algebra library for Dlang
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Lubeck
High level linear algebra library for Dlang
Required system libraries
See wiki: Link with CBLAS & LAPACK.
API
mtimes
- General matrix-matrix, row-matrix, matrix-column, and row-column multiplications.mldivide
- Solve systems of linear equations AX = B for X. Computes minimum-norm solution to a linear least squares problem if A is not a square matrix.inv
- Inverse of matrix.svd
- Singular value decomposition.pca
- Principal component analysis of raw data.pinv
- Moore-Penrose pseudoinverse of matrix.det
/detSymmetric
- General/symmetric matrix determinant.eigSymmetric
- Eigenvalues and eigenvectors of symmetric matrix.- Qr decomposition:
qrDecomp
withsolve
method - Cholesky:
choleskyDecomp
withsolve
method - LU decomposition:
luDecomp
withsolve
method - LDL decomposition:
ldlDecomp
withsolve
method
Example
/+dub.sdl:
dependency "lubeck" version="~>0.1"
libs "lapack" "blas"
+/
// or libs "openblas"
import std.stdio;
import mir.ndslice: magic, repeat, as, slice;
import kaleidic.lubeck: mtimes;
void main()
{
auto n = 5;
// Magic Square
auto matrix = n.magic.as!double.slice;
// [1 1 1 1 1]
auto vec = 1.repeat(n).as!double.slice;
// Uses CBLAS for multiplication
matrix.mtimes(vec).writeln;
matrix.mtimes(matrix).writeln;
}
Related packages
This work has been sponsored by Symmetry Investments and Kaleidic Associates.
About Kaleidic Associates
We are a boutique consultancy that advises a small number of hedge fund clients. We are not accepting new clients currently, but if you are interested in working either remotely or locally in London or Hong Kong, and if you are a talented hacker with a moral compass who aspires to excellence then feel free to drop me a line: laeeth at kaleidic.io
We work with our partner Symmetry Investments, and some background on the firm can be found here:
http://symmetryinvestments.com/about-us/
- Registered by Ilia Ki
- 1.5.4 released a year ago
- kaleidicassociates/lubeck
- BSL-1.0
- Copyright © 2017-2020, Symmetry Investments & Kaleidic Associates; Copyright (c) 2009, Lars T. Kyllingstad (SciD)
- Authors:
- Dependencies:
- mir-lapack
- Versions:
-
1.5.4 2023-Jul-24 1.5.3 2022-Nov-18 1.5.2 2022-Nov-17 1.5.1 2022-Feb-24 1.5.0 2021-Aug-20 - Download Stats:
-
-
0 downloads today
-
3 downloads this week
-
19 downloads this month
-
347 downloads total
-
- Score:
- 2.6
- Short URL:
- lubeck.dub.pm