We-ve just merged an important feature into the km...
# mathematics
a
We-ve just merged an important feature into the kmath dev branch: https://github.com/mipt-npm/kmath/tree/dev/kmath-ast The general idea is to introduce an AST for mathematics (I called it MST). It covers generic singular (constant, numbers), unary operators and binary operators. Using this representation we can now: • parse string expressions (not yet fully functional, we need to update the parser) • Optimize the exression (like caclulate numeric expressions). • Execute it on a given algebra dynamically or even generate a bytecode for optimized computations in ASM. The feature is rather important for integration with automatic differentiation like @breandan's kotlingrad and other powerfull tools, maybe even symbolic algebra. The asm feature was fully contributed by @Iaroslav Postovalov and he did a lot to drive the feature. I've made a dev release especially for the feature: https://github.com/mipt-npm/kmath/releases/tag/0.1.4-dev-8 (it is available on the bintray in dev repository). It is not by any means finished, since we still need to improve it and understand how to work with it better. Any feedback is really appreciated.
👍 6
z
Congrats, it's big step forward
a
Thanks to @Iaroslav Postovalov. We will need to think a lot about the design. Yet even right now it should be possible to do complicated things like compute boolean operations inside numeric expressions.