5#ifndef LINE_API_SYM_SYM_ENGINE_H
6#define LINE_API_SYM_SYM_ENGINE_H
76 std::vector<std::string>
pi;
77 std::vector<std::string>
num;
78 std::string
den =
"1";
92 std::vector<std::vector<std::string>>
momAll;
97 std::vector<std::string>
pi;
98 std::vector<std::string>
num;
99 std::string
den =
"1";
112 std::vector<std::string>
pi;
113 std::vector<std::string>
dpi;
136 virtual std::string
name()
const = 0;
149 const std::vector<std::string>& symbols) = 0;
161 const std::vector<std::string>& symbols,
162 const std::string& theta,
163 const std::vector<std::string>& reward) = 0;
190 const std::vector<std::string>& symbols,
191 const std::vector<std::vector<std::string>>& weights,
192 const std::vector<std::string>& names,
193 const std::vector<RatioSpec>& ratios) = 0;
223 const std::vector<std::string>& s0,
224 const std::vector<std::string>& alpha,
225 const std::string& atom,
226 const std::vector<std::string>& symbols,
227 const std::string& svar,
228 const std::vector<std::string>& want,
int nmax) = 0;
230 virtual std::vector<std::string>
simplify(
const std::vector<std::string>& exprs,
231 const std::string& form) = 0;
241 virtual std::vector<std::string>
diff(
const std::vector<std::string>& exprs,
242 const std::string& variable,
int order) = 0;
251 virtual std::vector<double>
eval(
const std::vector<std::string>& exprs,
252 const std::map<std::string, double>& assignment) = 0;
263 const std::vector<std::string>& vars,
264 const std::vector<std::string>& want) = 0;
Error(const std::string &what)
SymEngineError(const std::string &what)
A computer algebra backend.
virtual bool isAvailable() const =0
True if the engine answers a health probe.
virtual std::string name() const =0
Name of the backing engine, e.g.
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 std::vector< std::string > diff(const std::vector< std::string > &exprs, const std::string &variable, int order)=0
Differentiates expressions.
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
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.
virtual CtmcMeasures ctmcMeasures(const std::vector< std::vector< std::string > > &Q, const std::vector< std::string > &symbols, const std::vector< std::vector< std::string > > &weights, const std::vector< std::string > &names, const std::vector< RatioSpec > &ratios)=0
Rewrites expressions into a normal form.
virtual Passage ctmcPassage(const std::vector< std::vector< std::string > > &S, const std::vector< std::string > &s0, const std::vector< std::string > &alpha, const std::string &atom, const std::vector< std::string > &symbols, const std::string &svar, const std::vector< std::string > &want, int nmax)=0
First passage time into a target set: the transform and the moments.
The exception types the port throws.
Conservation laws of a layered queueing network, enumerated from its structure.
Symbolic stationary distribution of a CTMC.
std::string name
Caller supplied name.
std::string num
Numerator of expr, empty when undefined.
std::string reason
Why the value is undefined, empty otherwise.
std::string expr
The value as a rational function, or "undefined".
std::string den
Denominator of expr, empty when undefined.
bool isDefined() const
True if this measure has a value.
Stationary distribution together with the measures taken from it.
std::vector< CtmcMeasure > ratios
One per requested ratio, in order.
std::string den
Common denominator of the whole vector.
std::vector< CtmcMeasure > measures
One per weight vector, in order.
int nConnComp
Weakly connected components.
std::vector< std::string > num
Numerator of each entry over den.
std::vector< int > connComp
Component index of each state, one based.
std::vector< std::string > pi
Stationary probability of each state.
std::vector< std::string > pi
Stationary probability of each state, as an expression.
std::vector< int > connComp
Component index of each state, one based.
std::vector< std::string > num
Numerator of each entry over the common denominator.
int nConnComp
Weakly connected components of the generator.
std::string den
Common denominator of the whole vector.
Symbolic analysis of a fluid vector field.
std::vector< std::string > latex
LaTeX form of each right hand side.
std::vector< std::map< std::string, std::string > > equilibria
variable -> expression
std::vector< std::vector< std::string > > jacobian
d f_i / d x_j
First passage time transform and moments.
std::vector< std::vector< std::string > > momAll
Per start state moments.
std::vector< std::string > lstAll
Per start state transform.
std::string lstNum
Numerator of lst.
std::string lst
The transform L(s), empty if not requested.
std::vector< std::string > moments
Moments 1..nmax for the initial law.
std::vector< int > unreachable
States that cannot reach the target.
std::string lstDen
Denominator of lst.
A ratio of two measures, by their index into the weight block.
std::size_t num
Index of the numerator measure.
std::string name
Name of the resulting measure.
std::size_t den
Index of the denominator measure.
Exact parametric sensitivity, following Trivedi and Bobbio (2017), Sec.
bool hasReward
Whether Er, S and SS were computed.
std::vector< std::string > dpi
Derivative of the distribution with respect to theta.
std::vector< std::string > pi
Stationary distribution.
std::string SS
Scaled sensitivity (theta/E[r]) d(E[r])/dtheta, Eq. (9.80).
std::string Er
Mean reward, empty if no reward was given.
std::string S
Unscaled sensitivity d(E[r])/dtheta, Eq. (9.79).