2018-08-03 09:31:24 +03:00
|
|
|
# KMath
|
|
|
|
Kotlin MATHematics library is intended as a kotlin based analog of numpy python library. Contrary to `numpy`
|
|
|
|
and `scipy` it is modular and has a lightweight core.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
* **Algebra**
|
|
|
|
* Mathematical operation entities like rings, spaces and fields with (**TODO** add example to wiki)
|
2018-08-24 21:11:59 +03:00
|
|
|
* Basic linear algebra operations (sums products, etc) backed by `Space` API.
|
2018-08-03 09:31:24 +03:00
|
|
|
* [In progress] advanced linear algebra operations like matrix inversions.
|
2018-08-24 21:11:59 +03:00
|
|
|
* **Array-like structures** Full support of numpy-like ndarray including mixed arithmetic operations and function operations
|
2018-08-03 09:31:24 +03:00
|
|
|
on arrays and numbers just like it works in python (with benefit of static type checking).
|
|
|
|
|
2018-08-25 20:58:26 +03:00
|
|
|
* **Expressions** Expressions are one of the ultimate goals of kmath. It is planned to be able to write some mathematical
|
|
|
|
expression once an then apply it to different types of objects by providing different context. Exception could be used
|
|
|
|
for a wide variety of purposes from high performance calculations to code generation.
|
|
|
|
|
2018-08-24 21:11:59 +03:00
|
|
|
## Planned features
|
|
|
|
|
|
|
|
* **Common mathematics** It is planned to gradually wrap most parts of [Apache commons-math](http://commons.apache.org/proper/commons-math/)
|
|
|
|
library in kotlin code and maybe rewrite some parts to better suite kotlin programming paradigm. There is no fixed priority list for that. Feel free
|
|
|
|
to submit a future request if you want something to be done first.
|
|
|
|
|
|
|
|
* **Messaging** A mathematical notation to support multilanguage and multinod communication for mathematical tasks.
|
|
|
|
|
2018-08-03 09:31:24 +03:00
|
|
|
## Multi-platform support
|
|
|
|
KMath is developed as a multi-platform library, which means that most of interfaces are declared in common module.
|
|
|
|
Implementation is also done in common module wherever it is possible. In some cases features are delegated to
|
2018-08-24 21:11:59 +03:00
|
|
|
platform even if they could be done in common module because of platform performance optimization.
|
|
|
|
Currently the main focus of development is the JVM platform, contribution of implementations for Kotlin - Native and
|
|
|
|
Kotlin - JS is welcome.
|
2018-08-03 09:31:24 +03:00
|
|
|
|
2018-09-28 21:07:42 +03:00
|
|
|
It is planned to move project structure to [kotlin gradle mpp structure](https://github.com/h0tk3y/k-new-mpp-samples) after release of kotlin 1.3.
|
|
|
|
|
2018-08-03 09:31:24 +03:00
|
|
|
## Performance
|
|
|
|
The calculation performance is one of major goals of KMath in the future, but in some cases it is not possible to achieve
|
|
|
|
both performance and flexibility. We expect to firstly focus on creating convenient universal API and then work on
|
|
|
|
increasing performance for specific cases. We expect the worst KMath performance still be better than natural python,
|
|
|
|
but worse than optimized native/scipy (mostly due to boxing operations on primitive numbers). The best performance
|
|
|
|
of optimized parts should be better than scipy.
|
|
|
|
|
|
|
|
## Releases
|
|
|
|
The project is currently in pre-release stage. Work builds could be obtained with
|
|
|
|
[![](https://jitpack.io/v/altavir/kmath.svg)](https://jitpack.io/#altavir/kmath).
|
|
|
|
|
|
|
|
## Contributing
|
|
|
|
The project requires a lot of additional work. Please fill free to contribute in any way and propose new features.
|