Commit be2622e4 authored by sebastien's avatar sebastien
Browse files

trunk preprocessor: added some comments


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2176 ac1d8469-bf42-47a9-8791-bf33cf982152
parent a3a39d0a
......@@ -17,8 +17,8 @@
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BLOCKTRIANGULAR_H
#define BLOCKTRIANGULAR_H
#ifndef _BLOCKTRIANGULAR_HH
#define _BLOCKTRIANGULAR_HH
#include <string>
#include "ExprNode.hh"
......
......@@ -17,8 +17,8 @@
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CODEINTERPRETER
#define CODEINTERPRETER
#ifndef _CODEINTERPRETER_HH
#define _CODEINTERPRETER_HH
const char FLDZ=0;
const char FLDT=1;
......@@ -61,7 +61,7 @@ enum BlockSimulationType
SOLVE_BACKWARD_COMPLETE = 6, //!< Block of several equations, newton solver needed, backward
SOLVE_TWO_BOUNDARIES_COMPLETE = 7, //!< Block of several equations, newton solver needed, forward and backwar
EVALUATE_FOREWARD_R = 8, //!< Simple evaluation, normalized variable on right-hand side, forward
EVALUATE_BACKWARD_R = 9 //!< Simple evaluation, normalized variable on right-hand side, backward
EVALUATE_BACKWARD_R = 9 //!< Simple evaluation, normalized variable on right-hand side, backward
};
//! Enumeration of possible symbol types
......
......@@ -17,8 +17,8 @@
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MODELBLOCKS
#define MODELBLOCKS
#ifndef _MODELBLOCKS_HH
#define _MODELBLOCKS_HH
#include "ModelNormalization.hh"
//! Sparse form of the graph, with strongly connected components
......@@ -32,7 +32,7 @@ typedef struct block_result
block_result_t;
//! Implements Tarjan algorithm
//! Computes strongly connected components and converts it to block decomposition
class Blocks
{
public:
......
......@@ -17,18 +17,20 @@
* along with Dynare. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MODELNORMALIZATION
#define MODELNORMALIZATION
#ifndef _MODELNORMALIZATION_HH
#define _MODELNORMALIZATION_HH
#include "SymbolTable.hh"
#include "CodeInterpreter.hh"
//! One edge in the bi-partite graph (equation side), stored in a chained-list
struct Edge
{
Edge *next;
int Vertex_Index;
int Vertex_Index; //!< Variable linked to the equation
};
//! Set of the edges going to a given equation
struct Equation_vertex
{
Edge *First_Edge;
......@@ -36,6 +38,7 @@ struct Equation_vertex
int matched;
};
//! Bi-partite graph, seen from the equation side
struct Equation_set
{
Equation_vertex *Number;
......@@ -50,13 +53,16 @@ struct simple
int index;
};
//! Computes the model normalization
class Normalization
{
private:
//! Indicates if a given variable vertex is matched
struct Variable_vertex
{
int matched;
};
//! Data extracted from the bi-partite graph, seen from the variable side
struct Variable_set
{
Variable_vertex *Number;
......
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