AlpsDecompParam.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AlpsDecompParam_h_
00018 #define AlpsDecompParam_h_
00019
00020
00021 #include "UtilParameters.h"
00022
00023
00029
00030
00031
00032 class AlpsDecompParam {
00033
00034
00039
00040
00041 public:
00048 int logFileLevel;
00049
00054 bool printSolution;
00055
00059 bool checkMemory;
00060
00069 int msgLevel;
00070
00074 int nodeLimit;
00075
00079 int nodeLogInterval;
00080
00081
00082
00087
00088 public:
00089 void getSettings(UtilParameters& param) {
00090 static const char* sec = "ALPS";
00091 logFileLevel = param.GetSetting("logFileLevel", 0, sec);
00092 printSolution = param.GetSetting("printSolution", false, sec);
00093 checkMemory = param.GetSetting("checkMemory", false, sec);
00094 msgLevel = param.GetSetting("msgLevel", 2, sec);
00095 nodeLimit = param.GetSetting("nodeLimit", ALPS_INT_MAX, sec);
00096 nodeLogInterval = param.GetSetting("nodeLogInterval", 10, sec);
00097
00098 if (msgLevel > 2) {
00099 dumpSettings();
00100 }
00101 }
00102
00103 void dumpSettings(std::ostream* os = &std::cout) {
00104 static const char* sec = "ALPS";
00105 (*os) << "\n========================================================\n"
00106 << "ALPS PARAMETER SETTINGS \n";
00107 (*os) << sec << ": logFileLevel = " << logFileLevel << std::endl;
00108 (*os) << sec << ": printSolution = " << printSolution << std::endl;
00109 (*os) << sec << ": checkMemory = " << checkMemory << std::endl;
00110 (*os) << sec << ": msgLevel = " << msgLevel << std::endl;
00111 (*os) << sec << ": nodeLimit = " << nodeLimit << std::endl;
00112 (*os) << sec << ": nodeLogInterval = " << nodeLogInterval << std::endl;
00113 }
00118
00123
00124 public:
00128 AlpsDecompParam() {}
00129
00130 AlpsDecompParam(UtilParameters& utilParam) {
00131 getSettings(utilParam);
00132 }
00133
00137 ~AlpsDecompParam() {}
00141 };
00142
00143 #endif