A computer algebra backend.
More...
#include <line/api/sym/sym_engine.h>
|
| virtual | ~SymEngine () |
| virtual std::string | name () const =0 |
| | Name of the backing engine, e.g.
|
| virtual bool | isAvailable () const =0 |
| | True if the engine answers a health probe.
|
| virtual CtmcSolution | solveCTMC (const std::vector< std::vector< std::string > > &Q, const std::vector< std::string > &symbols)=0 |
| | Symbolic stationary distribution of a CTMC, pi Q = 0 with sum(pi) = 1.
|
| virtual SymSensitivity | ctmcSensitivity (const std::vector< std::vector< std::string > > &Q, const std::vector< std::string > &symbols, const std::string &theta, const std::vector< std::string > &reward)=0 |
| | Exact parametric sensitivity of a steady-state reward.
|
| virtual std::vector< std::string > | simplify (const std::vector< std::string > &exprs, const std::string &form)=0 |
| | Rewrites expressions into a normal form.
|
| virtual std::vector< std::string > | diff (const std::vector< std::string > &exprs, const std::string &variable, int order)=0 |
| | Differentiates expressions.
|
| virtual std::vector< double > | eval (const std::vector< std::string > &exprs, const std::map< std::string, double > &assignment)=0 |
| | Substitutes values for symbols and evaluates.
|
| virtual FluidODEs | fluidODEs (const std::vector< std::string > &rhs, const std::vector< std::string > &vars, const std::vector< std::string > &want)=0 |
| | Jacobian, LaTeX form and equilibria of a fluid vector field.
|
A computer algebra backend.
Definition at line 82 of file sym_engine.h.
◆ ~SymEngine()
| virtual line::sym::SymEngine::~SymEngine |
( |
| ) |
|
|
inlinevirtual |
◆ ctmcSensitivity()
| virtual SymSensitivity line::sym::SymEngine::ctmcSensitivity |
( |
const std::vector< std::vector< std::string > > & | Q, |
|
|
const std::vector< std::string > & | symbols, |
|
|
const std::string & | theta, |
|
|
const std::vector< std::string > & | reward ) |
|
pure virtual |
Exact parametric sensitivity of a steady-state reward.
- Parameters
-
| Q | generator entries as expression strings, row major |
| symbols | the symbols appearing in Q |
| theta | the symbol to differentiate with respect to |
| reward | reward rate per state, empty for the distribution alone |
- Returns
- the sensitivity of the distribution and, if a reward is given, of its mean
Implemented in line::sym::SageRestEngine.
◆ diff()
| virtual std::vector< std::string > line::sym::SymEngine::diff |
( |
const std::vector< std::string > & | exprs, |
|
|
const std::string & | variable, |
|
|
int | order ) |
|
pure virtual |
Differentiates expressions.
- Parameters
-
| exprs | the expressions |
| variable | the differentiation variable |
| order | the order of the derivative, at least 1 |
- Returns
- the derivatives, in the input order
Implemented in line::sym::SageRestEngine.
◆ eval()
| virtual std::vector< double > line::sym::SymEngine::eval |
( |
const std::vector< std::string > & | exprs, |
|
|
const std::map< std::string, double > & | assignment ) |
|
pure virtual |
Substitutes values for symbols and evaluates.
- Parameters
-
| exprs | the expressions |
| assignment | value of each symbol |
- Returns
- the numeric values, NaN where a free symbol remains
Implemented in line::sym::SageRestEngine.
◆ fluidODEs()
| virtual FluidODEs line::sym::SymEngine::fluidODEs |
( |
const std::vector< std::string > & | rhs, |
|
|
const std::vector< std::string > & | vars, |
|
|
const std::vector< std::string > & | want ) |
|
pure virtual |
Jacobian, LaTeX form and equilibria of a fluid vector field.
- Parameters
-
| rhs | the right hand side of dx/dt, one expression per state variable |
| vars | the state variable names |
| want | any of jacobian, latex, equilibria |
- Returns
- the requested items
Implemented in line::sym::SageRestEngine.
◆ isAvailable()
| virtual bool line::sym::SymEngine::isAvailable |
( |
| ) |
const |
|
pure virtual |
◆ name()
| virtual std::string line::sym::SymEngine::name |
( |
| ) |
const |
|
pure virtual |
◆ simplify()
| virtual std::vector< std::string > line::sym::SymEngine::simplify |
( |
const std::vector< std::string > & | exprs, |
|
|
const std::string & | form ) |
|
pure virtual |
Rewrites expressions into a normal form.
- Parameters
-
| exprs | the expressions |
| form | one of simplify, factor, together, cancel, expand, latex |
- Returns
- the rewritten expressions, in the input order
Implemented in line::sym::SageRestEngine.
◆ solveCTMC()
| virtual CtmcSolution line::sym::SymEngine::solveCTMC |
( |
const std::vector< std::vector< std::string > > & | Q, |
|
|
const std::vector< std::string > & | symbols ) |
|
pure virtual |
Symbolic stationary distribution of a CTMC, pi Q = 0 with sum(pi) = 1.
- Parameters
-
| Q | generator entries as expression strings, row major and square |
| symbols | the symbols appearing in Q, e.g. x1..xE |
- Returns
- the solution, with pi also split over a common denominator
Implemented in line::sym::SageRestEngine.
The documentation for this class was generated from the following file: