Skip to content
Snippets Groups Projects
Select Git revision
  • 6185767f63d61cca2a7fc71ad24c965fe3207a10
  • master default
  • nlf-fixes
  • newton-quadratic-equation-solver
  • nlf-fixes-r
  • nls-fixes
  • sep-fixes
  • sep
  • use-dprior
  • ep-sparse
  • rebase-1
  • parfor
  • reset-seed-in-unit-tests
  • remove-persistent-variables
  • nonlinear-filter-fixes
  • pac-mce-with-composite-target
  • 6.x
  • dprior
  • covariance-quadratic-approximation
  • benchmark-ec
  • kalman_mex
  • 5.5
  • 5.4
  • 5.3
  • 5.2
  • 5.1
  • 5.0
  • 5.0-rc1
  • 4.7-beta3
  • 4.7-beta2
  • 4.7-beta1
  • 4.6.4
  • 4.6.3
  • 4.6.2
  • 4.6.1
  • 4.6.0
  • 4.6.0-rc2
  • 4.6.0-rc1
  • 4.6-beta1
  • 4.5.7
  • 4.5.6
41 results

dynare-misc-commands.rst

Blame
  • Forked from Dynare / dynare
    Source project has a limited visibility.
    ExprNode.hh 52.06 KiB
    /*
     * Copyright (C) 2007-2012 Dynare Team
     *
     * This file is part of Dynare.
     *
     * Dynare is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * Dynare is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
     */
    
    #ifndef _EXPR_NODE_HH
    #define _EXPR_NODE_HH
    
    using namespace std;
    
    #include <set>
    #include <map>
    #include <vector>
    #include <ostream>
    
    #include "SymbolTable.hh"
    #include "CodeInterpreter.hh"
    #include "ExternalFunctionsTable.hh"
    
    class DataTree;
    class VariableNode;
    class BinaryOpNode;
    
    typedef class ExprNode *expr_t;
    
    struct Model_Block;
    
    struct ExprNodeLess;
    
    //! Type for set of temporary terms
    /*! They are ordered by index number thanks to ExprNodeLess */
    typedef set<expr_t, ExprNodeLess> temporary_terms_t;
    
    //! set of temporary terms used in a block
    typedef set<int> temporary_terms_inuse_t;
    
    typedef map<int, int> map_idx_t;
    
    //! Type for evaluation contexts
    /*! The key is a symbol id. Lags are assumed to be null */
    typedef map<int, double> eval_context_t;
    
    //! Type for tracking first/second derivative functions that have already been written as temporary terms
    typedef map<pair<int, vector<expr_t> >, int> deriv_node_temp_terms_t;
    
    //! Possible types of output when writing ExprNode(s)
    enum ExprNodeOutputType
      {
        oMatlabStaticModel,                           //!< Matlab code, static model
        oMatlabDynamicModel,                          //!< Matlab code, dynamic model
        oMatlabStaticModelSparse,                     //!< Matlab code, static block decomposed model
        oMatlabDynamicModelSparse,                    //!< Matlab code, dynamic block decomposed model
        oCDynamicModel,                               //!< C code, dynamic model
        oCStaticModel,                                //!< C code, static model
        oMatlabOutsideModel,                          //!< Matlab code, outside model block (for example in initval)
        oLatexStaticModel,                            //!< LaTeX code, static model