Skip to content

libmir/mir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

427e0e9 · Sep 9, 2018
Sep 9, 2018
Feb 20, 2018
Sep 9, 2018
Sep 9, 2018
Aug 3, 2016
Sep 9, 2018
May 2, 2016
Sep 9, 2018
Jan 18, 2016
Feb 7, 2018
Sep 9, 2018
Sep 9, 2018
Sep 9, 2018
Feb 20, 2018

Repository files navigation

❗ ndslice was reworked and moved to Mir-Algorithm.

The last Mir version with old ndslice is v0.22.1.

❗️ Mir GLAS was moved to https://github.com/libmir/mir-glas.

Dub downloads License Bountysource Gitter

Latest version

codecov.io Circle CI

Benchmarks

Mir

Generic Numerical Library for Science and Machine Learning.

Separated Mir Projects
Open Source Projects based on Mir

Documentation

Documentation API can be found here. Read also the Mir blog.

Contents

  • mir.glas - Generic Linear Algebra Subroutines
  • mir.sparse Sparse Tensors
  • Sparse - DOK format
  • Different ranges for COO format
  • CompressedTensor - CSR/CSC formats
  • mir.sparse.blas - Sparse BLAS for CompressedTensor
  • 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.

Compatibility

LDC (LLVM D Compiler)
  • =1.2.0-beta2

DMD
  • =2.072

Linux Mac OS X Windows
64-bit Build Status Build Status Build status
32-bit Build Status N/A N/A

Example

/+dub.sdl:
dependency "mir" version="~>1.1.1"
+/
import std.stdio;
import mir.combinatorics;
void main(string[] args)
{
    writeln([1, 2].combinations);
}

Open on run.dlang.io

Fast setup with the dub package manager

Latest version

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.

Contributing

See our TODO List. Mir is very young and we are open for contributing to source code, documentation, examples and benchmarks.