Use NumConstNode* type for DataTree constants (previously they were just expr_t)
parent
15d7432105
commit
5498ce98ee
|
@ -119,7 +119,7 @@ DataTree::operator=(const DataTree &d)
|
|||
return *this;
|
||||
}
|
||||
|
||||
expr_t
|
||||
NumConstNode *
|
||||
DataTree::AddNonNegativeConstant(const string &value)
|
||||
{
|
||||
int id = num_constants.AddNonNegativeConstant(value);
|
||||
|
|
|
@ -140,7 +140,8 @@ public:
|
|||
DataTree &operator=(DataTree &&) = delete;
|
||||
|
||||
//! Some predefined constants
|
||||
expr_t Zero, One, Two, Three, MinusOne, NaN, Infinity, MinusInfinity, Pi;
|
||||
NumConstNode *Zero, *One, *Two, *Three, *NaN, *Infinity, *Pi;
|
||||
expr_t MinusOne, MinusInfinity;
|
||||
|
||||
//! Raised when a local parameter is declared twice
|
||||
class LocalVariableException
|
||||
|
@ -158,7 +159,7 @@ public:
|
|||
|
||||
inline expr_t AddPossiblyNegativeConstant(double val);
|
||||
//! Adds a non-negative numerical constant (possibly Inf or NaN)
|
||||
expr_t AddNonNegativeConstant(const string &value);
|
||||
NumConstNode *AddNonNegativeConstant(const string &value);
|
||||
//! Adds a variable
|
||||
VariableNode *AddVariable(int symb_id, int lag = 0);
|
||||
//! Gets a variable
|
||||
|
|
|
@ -578,7 +578,7 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, bool
|
|||
|
||||
/* Create auxiliary parameters and the expression to be substituted into
|
||||
the var_expectations statement */
|
||||
auto subst_expr = dynamic_model.Zero;
|
||||
expr_t subst_expr = dynamic_model.Zero;
|
||||
for (int lag = 0; lag < max_lag; lag++)
|
||||
for (auto variable : lhs)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue