High-level Linear algebra and scientific computing package in D.
The API is in very early stages and is subject to change without notice. If you are using it in your own projects, please pin to an exact version.
- dmd / ldc, a D compiler
- dub, D's package manager
- Link with CBLAS / LAPACK
To use this package, run the following command in the root directory of your project
dub add dlearn
Or manually add the following to your dub.json
"dlearn": "~>0.0.2"
See dub for details.
To use dlearn as script, use dub run --single example.d
, where the contents of example.d
are as follows:
#!/usr/bin/env dub
/+ dub.json:
{
"dependencies": {"dlearn": "*"}
}
+/
void main()
{
import std : writeln;
import dlearn;
dlearn.arrange(5).writeln;
}
import std : writeln;
import dlearn.allocation : ones, eye;
import dlearn.math : sinh;
import dlearn.linalg : matrixMultiply;
auto x = ones!double(2, 2);
auto y = x.matrixMultiply(eye!double(2));
y.sinh.writeln;
For more examples, please refer to the Documentation.
To build the package and run all unit tests (in parallel if possible):
dub test -q --parallel
Dlearn uses ddox
documentation generator which you can build with:
dub build -b ddox
Or you can build and then run a webserver with:
dub run -b ddox
If you find a bug, please submit an issue.
Any and all contributions are appreciated. If you think of a feature you'd like added, or how we can improve the project, submit an issue too.
dlearn is distributed under the MIT license, as found in LICENSE.