lubeck

High level linear algebra library for Dlang
授权协议 BSL-1.0 License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 周学义
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

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 problemif 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 with solve method
  • Cholesky: choleskyDecomp with solve method
  • LU decomposition: luDecomp with solve method
  • LDL decomposition: ldlDecomp with solve 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 arenot accepting new clients currently, but if you are interested in working either remotelyor locally in London or Hong Kong, and if you are a talented hacker with a moral compasswho 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 befound here:

http://symmetryinvestments.com/about-us/

相关阅读

相关文章

相关问答

相关文档