Skip to content
Snippets Groups Projects
Select Git revision
  • 051f41c5f772b708957c0fa0729c362e39bed305
  • master default protected
  • julia protected
  • 6.x protected
  • python-codegen
  • llvm-15
  • 5.x protected
  • 4.6 protected
  • uop
  • rework_pac
  • aux_vars_fix
  • julia-7.0.0
  • julia-6.4.0
  • julia-6.3.0
  • julia-6.2.0
15 results

DynamicModel.cc

Blame
  • ExprNode.hh 18.94 KiB
    /*
     * Copyright (C) 2007-2009 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 <iostream>
    #include <fstream>
    
    #include "SymbolTable.hh"
    #include "CodeInterpreter.hh"
    
    class DataTree;
    
    typedef class ExprNode *NodeID;
    
    struct Model_Block;
    
    struct ExprNodeLess;
    
    //! Type for set of temporary terms
    /*! They are ordered by index number thanks to ExprNodeLess */
    typedef set<NodeID, ExprNodeLess> temporary_terms_type;
    
    typedef map<int,int> map_idx_type;
    typedef set<int> temporary_terms_inuse_type;
    
    //! Type for evaluation contexts
    /*! The key is a symbol id. Lags are assumed to be null */
    typedef map<int, double> eval_context_type;
    
    //! Possible types of output when writing ExprNode(s)
    enum ExprNodeOutputType
      {
        oMatlabStaticModel,       //!< Matlab code, static model declarations
        oMatlabDynamicModel,      //!< Matlab code, dynamic model declarations
        oMatlabStaticModelSparse, //!< Matlab code, static block decomposed mode declaration
        oMatlabDynamicModelSparse,//!< Matlab code, dynamic block decomposed mode declaration
        oCStaticModel,            //!< C code, static model declarations
        oCDynamicModel,           //!< C code, dynamic model declarations
        oMatlabOutsideModel,      //!< Matlab code, outside model block (for example in initval)
        oLatexStaticModel,        //!< LaTeX code, static model declarations
        oLatexDynamicModel        //!< LaTeX code, dynamic model declarations
      };
    
    #define IS_MATLAB(output_type) ((output_type) == oMatlabStaticModel     \
                                    || (output_type) == oMatlabDynamicModel \
                                    || (output_type) == oMatlabOutsideModel \
                                    || (output_type) == oMatlabStaticModelSparse \