Minsky
MathDAG::IntegralInputVariableDAG Struct Reference

represents the input of an integration operation - differs from Variable DAG in that it doesn't refer to the VariableValue More...

#include <equations.h>

Inheritance diagram for MathDAG::IntegralInputVariableDAG:
Inheritance graph
Collaboration diagram for MathDAG::IntegralInputVariableDAG:
Collaboration graph

Public Member Functions

VariableValuePtr addEvalOps (EvalOpVector &, const VariableValuePtr &) override
 adds EvalOps to an EvalOpVector representing this node. More...
 
- Public Member Functions inherited from MathDAG::VariableDAG
 VariableDAG ()
 reference to operation if this is an integral variable More...
 
 VariableDAG (const string &valueId, const string &name, Type type)
 
int BODMASlevel () const override
 algebraic heirarchy level, used for working out whether brackets are necessary. More...
 
int order (unsigned maxOrder) const override
 returns evaluation order in sequence of variable defintions More...
 
bool tensorEval (std::set< const Node *> &) const override
 returns true if the evaluation of this involves tensor processing More...
 
ostream & latex (ostream &) const override
 writes LaTeX representation of this DAG to the stream More...
 
ostream & matlab (ostream &) const override
 writes a matlab representation of this DAG to the stream More...
 
void render (ecolab::cairo::Surface &surf) const override
 renders a visual representation of this node to surf graphic extends right from the current pen position (which needs to be defined), and pen is moved to the right edge of the graphic. The determine bounding box, render into a recording surface, and use width()/height() More...
 
NodePtr derivative (SystemOfEquations &) const override
 support for the derivative operator. More...
 
bool addTensorOp (EvalOpVector &ev)
 adds a TensorEvalOp, returns true if successful More...
 
virtual bool tensorEval (std::set< const Node * > &visited) const=0
 returns true if the evaluation of this involves tensor processing More...
 
bool tensorEval ()
 returns true if the evaluation of this involves tensor processing More...
 
virtual ostream & latex (ostream &) const=0
 writes LaTeX representation of this DAG to the stream More...
 
LaTeXManip latex () const
 used within io streaming More...
 
virtual ostream & matlab (ostream &) const=0
 writes a matlab representation of this DAG to the stream More...
 
MatlabManip matlab () const
 
virtual VariableValuePtr addEvalOps (EvalOpVector &, const VariableValuePtr &result={})=0
 adds EvalOps to an EvalOpVector representing this node. More...
 
- Public Member Functions inherited from MathDAG::Node
virtual ~Node ()
 
std::string latexStr () const
 
std::string matlabStr () const
 
bool tensorEval ()
 returns true if the evaluation of this involves tensor processing More...
 
LaTeXManip latex () const
 used within io streaming More...
 
MatlabManip matlab () const
 

Additional Inherited Members

- Public Types inherited from minsky::VariableType
enum  Type {
  undefined, constant, parameter, flow,
  integral, stock, tempFlow, numVarTypes
}
 
- Static Public Member Functions inherited from minsky::VariableType
static std::string typeName (int t)
 
- Public Attributes inherited from MathDAG::VariableDAG
string valueId
 
Type type =undefined
 
string name
 
string init ="0"
 
WeakNodePtr rhs
 
IntOpintOp =0
 
- Public Attributes inherited from MathDAG::Node
int cachedOrder =-1
 
VariableValuePtr result
 reference to where this node's value is stored More...
 

Detailed Description

represents the input of an integration operation - differs from Variable DAG in that it doesn't refer to the VariableValue

Definition at line 212 of file equations.h.

Member Function Documentation

◆ addEvalOps()

VariableValuePtr MathDAG::IntegralInputVariableDAG::addEvalOps ( EvalOpVector ,
const VariableValuePtr result 
)
overridevirtual

adds EvalOps to an EvalOpVector representing this node.

Returns
a variable where the result is stored. If a flowVariable has been provided in result, that may be used directly, otherwise a copy operation is added to ensure it receives the result.

Reimplemented from MathDAG::VariableDAG.

Definition at line 148 of file equations.cc.

References minsky::doOneEvent(), minsky::VariableType::tempFlow, and minsky::VariableType::undefined.

149  {
150  assert(result);
151  if (result->type()==VariableType::undefined)
152  {
153  assert(r);
154  if (r->type()!=VariableType::undefined && r->isFlowVar())
155  result=r;
156  else
157  {
159  result->allocValue();
160  }
161  if (rhs)
162  rhs->addEvalOps(ev, result);
163  else
164  throw runtime_error("integral not defined for "+name);
165  }
166  assert(result->idx()>=0);
167  if (r && r->isFlowVar() && (r!=result || !result->isFlowVar()))
168  ev.emplace_back(EvalOpPtr(new TensorEval(r,result)));
169  doOneEvent(true);
170  return result;
171  }
virtual VariableValuePtr addEvalOps(EvalOpVector &, const VariableValuePtr &result={})=0
adds EvalOps to an EvalOpVector representing this node.
void doOneEvent(bool idletasksOnly)
checks if any GUI events are waiting, and proces an event if so
Definition: tclmain.cc:161
A helper to evaluate a variable value.
VariableValuePtr result
reference to where this node&#39;s value is stored
Definition: equations.h:128
a shared_ptr that default constructs a default target, and is always valid
WeakNodePtr rhs
Definition: equations.h:178
Here is the call graph for this function:

The documentation for this struct was generated from the following files: