1 : |
agomez |
1 |
#ifndef printinfo_h
|
2 : |
|
|
#define printinfo_h
|
3 : |
|
|
|
4 : |
|
|
#include "gadget.h" |
5 : |
|
|
|
6 : |
|
|
/**
|
7 : |
|
|
* \class PrintInfo
|
8 : |
|
|
* \brief This is the class used to store information about what format the model parameters should be written to file
|
9 : |
|
|
*/
|
10 : |
|
|
class PrintInfo {
|
11 : |
|
|
public:
|
12 : |
|
|
/**
|
13 : |
|
|
* \brief This is the PrintInfo constructor
|
14 : |
|
|
*/
|
15 : |
|
|
PrintInfo();
|
16 : |
|
|
/**
|
17 : |
|
|
* \brief This is the PrintInfo constructor that creates a copy of an existing PrintInfo
|
18 : |
|
|
* \param pi is the PrintInfo to copy
|
19 : |
|
|
*/
|
20 : |
|
|
PrintInfo(const PrintInfo& pi);
|
21 : |
|
|
/**
|
22 : |
|
|
* \brief This is the default MainInfo destructor
|
23 : |
|
|
*/
|
24 : |
|
|
~PrintInfo();
|
25 : |
|
|
/**
|
26 : |
|
|
* \brief This function will store the filename that the final parameter values will be written to
|
27 : |
|
|
* \param filename is the name of the file
|
28 : |
|
|
*/
|
29 : |
|
|
void setParamOutFile(char* filename);
|
30 : |
|
|
/**
|
31 : |
|
|
* \brief This function will store the filename that the model parameters will be written to
|
32 : |
|
|
* \param filename is the name of the file
|
33 : |
|
|
*/
|
34 : |
|
|
void setOutputFile(char* filename);
|
35 : |
|
|
/**
|
36 : |
|
|
* \brief This function will set the interval between iterations to be used when printing the model parameters to file
|
37 : |
|
|
* \param print is the interval
|
38 : |
|
|
*/
|
39 : |
|
|
void setPrintIteration(int print) { printiter = print; };
|
40 : |
|
|
/**
|
41 : |
|
|
* \brief This function will set the precision to be used when printing the model parameters
|
42 : |
|
|
* \param prec is the precision
|
43 : |
|
|
*/
|
44 : |
|
|
void setPrecision(int prec) { givenPrecision = prec; };
|
45 : |
|
|
/**
|
46 : |
|
|
* \brief This function will check the printing intervals and precision values that have been set, and override them with default vakues if required
|
47 : |
|
|
* \param net is the flag to denote whether the current model run is a network run or not
|
48 : |
|
|
*/
|
49 : |
|
|
void checkPrintInfo(int net);
|
50 : |
|
|
/**
|
51 : |
|
|
* \brief This function will return the filename that the model parameters will be written to
|
52 : |
|
|
* \return filename
|
53 : |
|
|
*/
|
54 : |
|
|
char* getOutputFile() const { return strOutputFile; };
|
55 : |
|
|
/**
|
56 : |
|
|
* \brief This function will return the filename that the final parameter values will be written to
|
57 : |
|
|
* \return filename
|
58 : |
|
|
*/
|
59 : |
|
|
char* getParamOutFile() const { return strParamOutFile; };
|
60 : |
|
|
/**
|
61 : |
|
|
* \brief This function will return the flag used to determine whether the model parameters should be printed to file
|
62 : |
|
|
* \return flag
|
63 : |
|
|
*/
|
64 : |
|
|
int getPrint() const { return printoutput; };
|
65 : |
|
|
/**
|
66 : |
|
|
* \brief This function will return the precision to be used when printing the model parameters
|
67 : |
|
|
* \return precision
|
68 : |
|
|
*/
|
69 : |
|
|
int getPrecision() const { return givenPrecision; };
|
70 : |
|
|
/**
|
71 : |
|
|
* \brief This function will return the interval between iterations to be used when printing the model parameters to file
|
72 : |
|
|
* \return print interval
|
73 : |
|
|
*/
|
74 : |
|
|
int getPrintIteration() const { return printiter; };
|
75 : |
|
|
private:
|
76 : |
|
|
/**
|
77 : |
|
|
* \brief This is the name of the file that the final parameter values will be written to
|
78 : |
|
|
*/
|
79 : |
|
|
char* strParamOutFile;
|
80 : |
|
|
/**
|
81 : |
|
|
* \brief This is the name of the file that the model parameters values will be written to
|
82 : |
|
|
*/
|
83 : |
|
|
char* strOutputFile;
|
84 : |
|
|
/**
|
85 : |
|
|
* \brief This is the interval between iterations that the model parameters should be written to file
|
86 : |
|
|
*/
|
87 : |
|
|
int printiter;
|
88 : |
|
|
/**
|
89 : |
|
|
* \brief This is the flag used to denote whether the model parameters should be printed or not
|
90 : |
|
|
*/
|
91 : |
|
|
int printoutput;
|
92 : |
|
|
/**
|
93 : |
|
|
* \brief This is the precision that should be used when printing the model parameters
|
94 : |
|
|
*/
|
95 : |
|
|
int givenPrecision;
|
96 : |
|
|
};
|
97 : |
|
|
|
98 : |
|
|
#endif
|