❗️ Mir GLAS was moved to https://github.com/libmir/mir-glas. GLAS implementation in current repository is deprecated and will be removed soon.
Generic Numerical Library for Science and Machine Learning.
Documentation API can be found here. Read also the Mir blog.
mir.glas
- Generic Linear Algebra Subroutinesmir.ndslice
Multidimensional Random Access Ranges and Arraysmir.sparse
Sparse TensorsSparse
- DOK format- Different ranges for COO format
CompressedTensor
- CSR/CSC formatsmir.sparse.blas
- Sparse BLAS forCompressedTensor
mir.model.lda.hoffman
- Online variational Bayes for latent Dirichlet allocation (Online VB LDA) for sparse documents. LDA is used for topic modeling.mir.combinatorics
Combinations, combinations with repeats, cartesian power, permutations.mir.random.flex
- Tinfex non-uniform RNG implementation.mir.las.sum
Functions and Output Ranges for Summation Algorithms. Works with user-defined types.- Precise algorithm: improved analog of Python's
fsum
- Pairwise algorithm: fast version for Input Ranges
- Kahan, KBN, and KB2 algorithms
Mir can be compiled with LDC (LLVM D Compiler) >= 1.1.0-beta2
only. DMD is not supported anymore (v0.17-alpha9
is the last release with DMD support).
Linux | Mac OS X | Windows | |
---|---|---|---|
64-bit | |||
32-bit | N/A | N/A |
Dub is the D's package manager. You can create a new project with:
dub init <project-name>
Now you need to edit the dub.json
add mir
as dependency.
{
...
"dependencies": {
"mir": "~><current-version>"
},
"dflags-ldc": ["-mcpu=native"]
}
Now you can create an app.d
file in the source
folder and run your code with
dub --compiler=ldmd2
Flag --build=release
and can be added for a performance boost:
dub --compiler=ldmd2 --build=release
ldmd2
is a shell on top of LDC (LLVM D Compiler).
"dflags-ldc": ["-mcpu=native"]
allows LDC to optimize Mir for your CPU.
See our TODO List. Mir is very young and we are open for contributing to source code, documentation, examples and benchmarks.
mir.ndslice
is a development version of thestd.experimental.ndslice
package.