Context gathering the bridge objects needed for one scalar transformation.
More...
#include <codac2_sympy_bridge.h>
|
| | ScalarBridgeContext (const FunctionArgsList &args) |
| | Builds a scalar bridge context for a given function argument list.
|
| const pybind11::object & | sympy () const |
| | Returns the imported SymPy module.
|
| const FlatSymbolTable & | symbols () const |
| | Returns the associated flat symbol table.
|
| pybind11::object | export_scalar (const ScalarExpr &y) const |
| | Exports a Codac scalar expression to SymPy.
|
| ScalarExpr | import_scalar (const pybind11::handle &obj) const |
| | Imports a SymPy scalar expression into Codac.
|
| ScalarExpr | transform_scalar_expr (const ScalarExpr &y, const SympyTransform &transform, bool do_expand=true) const |
| | Applies a SymPy transformation to a Codac scalar expression.
|
Context gathering the bridge objects needed for one scalar transformation.
◆ ScalarBridgeContext()
| codac2::symbolic::detail::ScalarBridgeContext::ScalarBridgeContext |
( |
const FunctionArgsList & | args | ) |
|
|
explicit |
Builds a scalar bridge context for a given function argument list.
- Parameters
-
| args | Function argument list. |
◆ sympy()
| const pybind11::object & codac2::symbolic::detail::ScalarBridgeContext::sympy |
( |
| ) |
const |
Returns the imported SymPy module.
- Returns
- SymPy module.
◆ symbols()
| const FlatSymbolTable & codac2::symbolic::detail::ScalarBridgeContext::symbols |
( |
| ) |
const |
Returns the associated flat symbol table.
- Returns
- Flat symbol table.
◆ export_scalar()
| pybind11::object codac2::symbolic::detail::ScalarBridgeContext::export_scalar |
( |
const ScalarExpr & | y | ) |
const |
Exports a Codac scalar expression to SymPy.
- Parameters
-
| y | Codac scalar expression. |
- Returns
- Corresponding SymPy expression.
◆ import_scalar()
| ScalarExpr codac2::symbolic::detail::ScalarBridgeContext::import_scalar |
( |
const pybind11::handle & | obj | ) |
const |
Imports a SymPy scalar expression into Codac.
- Parameters
-
| obj | SymPy expression handle. |
- Returns
- Corresponding Codac scalar expression.
◆ transform_scalar_expr()
| ScalarExpr codac2::symbolic::detail::ScalarBridgeContext::transform_scalar_expr |
( |
const ScalarExpr & | y, |
|
|
const SympyTransform & | transform, |
|
|
bool | do_expand = true ) const |
Applies a SymPy transformation to a Codac scalar expression.
- Parameters
-
| y | Codac scalar expression. |
| transform | SymPy transformation. |
| do_expand | Whether the transformed expression should be expanded. |
- Returns
- Transformed Codac scalar expression.
The documentation for this class was generated from the following file: