Minsky
|
#include <evalOp.h>
Classes | |
struct | Support |
Public Types | |
typedef OperationType::Type | Type |
![]() | |
enum | Type { constant, time, integrate, differentiate, data, ravel, euler, pi, zero, one, inf, percent, add, subtract, multiply, divide, min, max, and_, or_, log, pow, polygamma, lt, le, eq, userFunction, copy, sqrt, exp, ln, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, abs, floor, frac, not_, Gamma, fact, sum, product, infimum, supremum, any, all, infIndex, supIndex, runningSum, runningProduct, difference, differencePlus, innerProduct, outerProduct, index, gather, meld, merge, slice, size, shape, mean, median, stdDev, moment, histogram, covariance, correlation, linearRegression, numOps } |
enum | Group { general, constop, binop, function, reduction, scan, tensor, statistics } |
Public Attributes | |
int | out =-1 |
indexes into the flow/stock variables vector More... | |
Static Public Attributes | |
static double | t |
static std::string | timeUnit |
std::vector< unsigned > | in1 |
std::vector< std::vector< Support > > | in2 |
bool | flow1 =true |
indicate whether in1/in2 are flow variables (out is always a flow variable) More... | |
bool | flow2 =true |
bool | xflow =true |
std::shared_ptr< OperationBase > | state |
state data (for those ops that need it) More... | |
void | throw_error (const std::string &msg) const |
virtual | ~EvalOpBase () |
virtual void | deriv (double df[], std::size_t n, const double ds[], const double sv[], const double fv[])=0 |
virtual void | eval (double fv[]=ValueVector::flowVars.data(), std::size_t n=ValueVector::flowVars.size(), const double sv[]=ValueVector::stockVars.data())=0 |
evaluate expression on sv and current value of fv, storing result in output variable (of fv) More... | |
virtual void | setTensorParams (const VariableValue &, const OperationBase &) |
set additional tensor operation related parameters More... | |
Additional Inherited Members | |
![]() | |
static std::string | typeName (int type) |
return the symbolic name of type More... | |
static Group | classify (Type t) |
|
inlinevirtual |
|
pure virtual |
total derivate with respect to a variable, which is a function of the stock variables.
sv | - stock variables |
fv | - flow variables (function of stock variables, computed by eval) |
ds | - derivative of stock variables |
df | - derivative of flow variables (updated by this function) |
n | - size of df array |
To compute the partial derivatives with respect to stock variable i, seed ds with 1 in the ith position, 0 every else, and initialise df to zero.
Implemented in minsky::ScalarEvalOp.
|
pure virtual |
evaluate expression on sv and current value of fv, storing result in output variable (of fv)
n | - size of fv array |
Implemented in minsky::ScalarEvalOp.
|
inlinevirtual |
|
inline |
in1 - indices describing input 1's vector in2 - indices describing input 2's vector (if double op) in2b/interp - interpolation support: out[i]=op(inp[in1[i]], interp*inp[in2[i]]+(1-interp)*inp[in2b[i]])
Definition at line 78 of file evalOp.h.
bool minsky::EvalOpBase::flow1 =true |
bool minsky::EvalOpBase::flow2 =true |
std::vector<unsigned> minsky::EvalOpBase::in1 |
std::vector<std::vector<Support> > minsky::EvalOpBase::in2 |
int minsky::EvalOpBase::out =-1 |
std::shared_ptr<OperationBase> minsky::EvalOpBase::state |
bool minsky::EvalOpBase::xflow =true |