|
Minsky: 3.17.0
|
Legacy EvalOp base interface. More...
#include <evalOp.h>


Public Member Functions | |
| virtual int | numArgs () const =0 |
| void | deriv (double df[], std::size_t n, const double ds[], const double sv[], const double fv[]) override |
| void | eval (double fv[], std::size_t, const double sv[]) override |
| evaluate expression on sv and current value of fv, storing result in output variable (of fv) More... | |
| virtual double | evaluate (double in1=0, double in2=0) const =0 |
| evaluate expression on given arguments, returning result More... | |
| virtual double | d1 (double x1=0, double x2=0) const =0 |
| virtual double | d2 (double x1=0, double x2=0) const =0 |
Public Member Functions inherited from minsky::EvalOpBase | |
| void | throw_error (const std::string &msg) const |
| virtual | ~EvalOpBase () |
| virtual void | setTensorParams (const VariableValue &, const OperationBase &) |
| set additional tensor operation related parameters More... | |
Static Public Member Functions | |
| static ScalarEvalOp * | create (Type op, const ItemPtr &state) |
| factory method More... | |
Static Public Member Functions inherited from minsky::OperationType | |
| static std::string | typeName (int type) |
| return the symbolic name of type More... | |
| static Group | classify (Type t) |
Public Attributes | |
| std::shared_ptr< VariableValue > | result |
| lifetime management of the resultant variableValue number of arguments to this operation More... | |
Public Attributes inherited from minsky::EvalOpBase | |
| int | out =-1 |
| indexes into the flow/stock variables vector More... | |
| 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... | |
Additional Inherited Members | |
Public Types inherited from minsky::EvalOpBase | |
| typedef OperationType::Type | Type |
Public Types inherited from minsky::OperationType | |
| 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 } |
Static Public Attributes inherited from minsky::EvalOpBase | |
| static double | t |
| static std::string | timeUnit |
|
static |
factory method
Definition at line 617 of file evalOp.cc.
References minsky::anonymous_namespace{evalOp.cc}::evalOpFactory, f, and minsky::op.
|
pure virtual |
derivatives with respect to 1st and second argument
|
pure virtual |
derivatives with respect to 1st and second argument
|
overridevirtual |
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.
Implements minsky::EvalOpBase.
Definition at line 93 of file evalOp.cc.
References minsky::anonymous_namespace{wire.cc}::d2(), and minsky::anonymous_namespace{userFunction.cc}::isfinite().

|
overridevirtual |
evaluate expression on sv and current value of fv, storing result in output variable (of fv)
| n | - size of fv array |
Implements minsky::EvalOpBase.
Definition at line 40 of file evalOp.cc.
|
pure virtual |
evaluate expression on given arguments, returning result
|
pure virtual |
| std::shared_ptr<VariableValue> minsky::ScalarEvalOp::result |