mrpt.expr
mrpt-expr: Runtime Compiled Expressions
Package Contents
- class mrpt.expr.CRuntimeCompiledExpression
C++ API: class mrpt::expr::CRuntimeCompiledExpression
- compile(expression: str, variables: dict[str, float] = {}) None
Compiles a string expression with optional variable and constant maps.
- eval() float
Evaluates the compiled expression and returns the result.
- get_original_expression() str
Returns the original formula string.
- is_compiled() bool
Returns true if the expression has been successfully compiled.
- register_function(name: str, func: Callable[[], float]) None
- register_function(name: str, func: Callable[[float], float]) None
- register_function(name: str, func: Callable[[float, float], float]) None
- register_function(name: str, func: Callable[[float, float, float], float]) None
Registers a 3-argument Python function.