next small change, still testing the CI

parent b16a1f91
......@@ -791,35 +791,36 @@ With these variables set, we take different actions, depending on the type of
node encountered in ``node_to_parse``. The following subsections explain those
actions.
VariableNode
````````````````
Condition 1: VariableNode (lines 79-97)
```````````````````````````````````````
If ``node_to_parse`` is a ``VariableNode`` it is an additive variable in the
equation. If it was declared as a parameter in the ``.mod`` file, then it's the
intercept of the equation. It is thus stored in ``Xtmp`` with the value of the
parameter at every period. If it's a lone exogenous variable, we treat it as
the residual. If there are more than one such variable, then it's an error. If
it's an endogenous variable, we add it to the ``dseries`` ``lhssub``, a
parameter at every period. If it's a lone exogenous variable that is not
present in ``ds``, we treat it as the residual. If there are more than one such
variable, then it's an error. If it's an endogenous variable or an exogenous
variable present in ``ds``, we add it to the ``dseries`` ``lhssub``, a
``dseries`` that will be subtracted from the LHS before returning. If the type
of the ``node_to_parse`` doesn't fall into any of these categories, parsing
ends with an error.
UnaryOpNode
```````````````
Condition 2: UnaryOpNode (lines 98-101)
```````````````````````````````````````
If ``node_to_parse`` is a ``UnaryOpNode``, we evaluate it and add it to the
``lhssub`` variable to be subtracted from the LHS.
BinaryOpNode with division operator
```````````````````````````````````
Condition 3: BinaryOpNode with division operator (lines 102-108)
````````````````````````````````````````````````````````````````
In this case, if a parameter is found in this expression, we end with a parsing
error. Otherwise, we evaluate the node and add it to ``lhssub``.
BinaryOpNode with multiplication operator
`````````````````````````````````````````
Condition 4: BinaryOpNode with multiplication operator (lines 109-137)
``````````````````````````````````````````````````````````````````````
In this case, we parse the ``node_to_parse``, by calling the local function ``parseTimesNode``
In this case, we parse the ``node_to_parse``, by calling the local function
``parseTimesNode``:
.. code-block:: MATLAB
:linenos: inline
......@@ -855,23 +856,24 @@ In this case, we parse the ``node_to_parse``, by calling the local function ``pa
end
end
This function handles returns the ``dseries`` vector/matrix ``X`` corresponding
to the regressors found. This function can handle parsing expressions of
additively-separated parameters multiplied by an expression of variables. Each
of the additively separated parameters in ``pterms`` corresponds to one column
of the returned vector/matrix ``X``.
This function returns the ``dseries`` vector/matrix ``X`` corresponding to the
regressors found. It can handle parsing expressions of additively-separated
parameters multiplied by an expression of variables. Each of the additively
separated parameters in ``pterms`` corresponds to one column of the returned
vector/matrix ``X``.
Returning from this function, we have ``Xtmp`` corresponding to the evaluated
variables and ``names`` corresponding to the parameter names. In the code that
follows, we add any columns of ``Xtmp`` that were multiplied by a constant to
``lhssub`` and then remove this column from ``Xtmp``.
follows (lines 113-137), we add any columns of ``Xtmp`` that were multiplied by
a constant to ``lhssub`` and then remove this column from ``Xtmp``.
Otherwise
`````````
Condition 5: Otherwise (line 139)
`````````````````````````````````
We have encountered a parsing error.
If none of the previous 4 conditions were satisfied, we have encountered a
parsing error.
End of loop, lines (143-151)
End of loop (lines 141-150)
````````````````````````````
At the end of the loop, we combine the temporary vector/matrix of regressors,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment