Minsky
|
#include <variableValues.h>
Public Member Functions | |
VariableValues () | |
void | clear () |
std::string | newName (const std::string &name) const |
generate a new valueId not otherwise in the system More... | |
void | reset () |
reset all variableValues to their initial conditions More... | |
void | resetValue (VariableValue &) const |
reset a give variable value to it's initial condition, in this context More... | |
TensorVal | initValue (const VariableValue &, std::set< std::string > &visited) const |
evaluates the initial value of a given variableValue in the context given by this. visited is used to check for circular definitions More... | |
TensorVal | initValue (const VariableValue &v) const |
std::vector< Summary > | summarise () const |
bool | validEntries () const |
checks that all entry names are valid More... | |
void | resetUnitsCache () |
![]() | |
ConstMap () | |
ConstMap (const T &x) | |
ConstMap (const T &x, const U &y) | |
VariableValuePtr | operator[] (const std::string &k) const |
Private Member Functions | |
CLASSDESC_ACCESS (VariableValues) | |
Static Private Member Functions | |
static VariableValuePtr & | zero () |
static VariableValuePtr & | one () |
Definition at line 46 of file variableValues.h.
|
inline |
Definition at line 52 of file variableValues.h.
References clear().
|
private |
|
inline |
Definition at line 53 of file variableValues.h.
Referenced by VariableValues().
TensorVal minsky::VariableValues::initValue | ( | const VariableValue & | v, |
std::set< std::string > & | visited | ||
) | const |
evaluates the initial value of a given variableValue in the context given by this. visited is used to check for circular definitions
Definition at line 252 of file variableValue.cc.
References minsky::FlowCoef::coef, minsky::VariableValue::init(), minsky::VariableValueData::m_scope, minsky::VariableValueData::name, minsky::VariableValueData::tensorInit, minsky::trimWS(), and minsky::valueId().
Referenced by minsky::VariableValue::init(), initValue(), MathDAG::latexInit(), and MathDAG::matlabInit().
|
inline |
Definition at line 71 of file variableValues.h.
References initValue().
string minsky::VariableValues::newName | ( | const std::string & | name | ) | const |
generate a new valueId not otherwise in the system
Definition at line 355 of file variableValue.cc.
References minsky::to_string(), and minsky::valueId().
Referenced by minsky::IntOp::description().
|
staticprivate |
Definition at line 84 of file variableValue.cc.
Referenced by clear().
void minsky::VariableValues::reset | ( | ) |
reset all variableValues to their initial conditions
Definition at line 365 of file variableValue.cc.
References minsky::VariableValue::allocValue(), minsky::VariableValue::idxInRange(), and minsky::VariableValue::reset_idx().
|
inline |
Definition at line 85 of file variableValues.h.
Referenced by minsky::VariableBase::units().
void minsky::VariableValues::resetValue | ( | VariableValue & | v | ) | const |
reset a give variable value to it's initial condition, in this context
Definition at line 328 of file variableValue.cc.
References minsky::VariableValue::allocValue(), minsky::cminsky(), minsky::Minsky::definingVar(), minsky::Minsky::dimensions, minsky::VariableValue::idx(), minsky::VariableValue::idxInRange(), minsky::VariableValue::isFlowVar(), minsky::VariableValueData::tensorInit, and minsky::VariableValue::valueId().
Referenced by MathDAG::ConstantDAG::addEvalOps(), and minsky::VariableBase::init().
|
inline |
Definition at line 76 of file variableValues.h.
bool minsky::VariableValues::validEntries | ( | ) | const |
checks that all entry names are valid
Definition at line 377 of file variableValue.cc.
References minsky::isValueId().
|
staticprivate |
Definition at line 80 of file variableValue.cc.
Referenced by clear().