Le vendredi 04 décembre 2009 à 09:09 -0500, houtan a écrit :
The implementation I had chosen for SvarIdentificationStatement (modified by the conversation regarding the maximum lag) is
class SvarIdentificationStatement : public Statement { public: typedef map<pair<int, int>, vector<string> > svar_identification_exclusion_type; private: const svar_identification_exclusion_type exclusion; const bool upper_cholesky_present; const bool lower_cholesky_present; const SymbolTable &symbol_table; int get_max_lag() const; public: SvarIdentificationStatement(const svar_identification_exclusion_type &exclusion_arg, const bool &upper_cholesky_present_arg, const bool &lower_cholesky_present_arg, const SymbolTable &symbol_table_arg); virtual void writeOutput(ostream &output, const string &basename) const; };
This looks good. When you're done, don't forget to add comments using Doxygen style (with the exclamation mark).
The map above stores pair<lag number, equation number>, vector of restrictions>
The vector<string> type is similar to the SymbolList type. I am not using SymbolList because this provides direct access to the vector elements for writing.
I am sorry, but I do not quite see the purpose of fillEvalContext from InitParamStatement or how it would be useful in this case. Why can't I simply take the information in and then write the output as described on the Wiki?
You don't need to implement that method. It is used for assigning numeric values to variables, so it has no sense here.
Best