MathVM

尚未评分

Math Expressions (parallel) evaluation and plotting

  • 支持的平台
  • 支持的引擎版本
    5.3
  • 下载类型
    引擎插件
    此产品包含一款代码插件,含有预编译的二进制文件以及与虚幻引擎集成的所有源代码,能够安装到您选择的引擎版本中,并根据每个项目的需求启动。

MathVM exposes a simple framework (both C++ and Blueprint) for running user-defined math expressions:

y = sin(x) * 2

This expression will compute the sin of x and multiply it by 2. The result will be put in y.


The two symbols (x and y), can be local variables or globals (more on this below) and, in the case of x, it can be a constant.


There is a very important difference between local and global: MathVM supports running expressions in parallel (read: on multiple threads) but while accessing local variables is fully thread-safe and lock-free (each thread works on a different copy of them), global variables are shared between parallel evaluations.


For global variables a locking is required to avoid race conditions (see below). Constants are shared and lock-free (but obviously you cannot change them).


The native data type is double and multiple statements can be specified by using the ; separator:

y = tan(x * 2); y = y + (3 * sin(z)); final = y + x;

If there are parts of your expressions that works over global variables (or resources, see below), and you want to avoid race conditions you can "surround" critical sections with curly brackets (braces):

y = sin(z); {x = x + 1;}

Here the x increment (assuming x is a global variable) will be under lock.


Note: the compiler will automatically detect deadlocks


A plotter is included for drawing simple lines/points based graphs.


The plugin is open source under the MIT license. This marketplace version is meant for supporting the development of the project.

技术细节

Features:

  •  Runtime evaluation of Math Expressions
  •  Parallel evaluation
  •  Plotting of results


Code Modules:

  •  MathVM (Runtime)


Number of Blueprints: 1

Number of C++ Classes: 10

Network Replicated: No

Supported Development Platforms: Windows, Linux, Mac

Supported Target Build Platforms: Windows, Linux, Mac, Android, iOS

Documentation: https://github.com/rdeioris/MathVM/blob/master/README.md