#include <AlpsParams.h>
Public Types | |
enum | boolParams { checkMemory, deleteDeadNode, interClusterBalance, intraClusterBalance, printSolution, endOfBoolParams } |
Character parameters. More... | |
enum | intParams { bufSpare, clockType, eliteSize, hubInitNodeNum, hubMsgLevel, hubNum, largeSize, logFileLevel, masterInitNodeNum, masterReportInterval, hubWorkClusterSizeLimit, mediumSize, msgLevel, nodeLimit, nodeLogInterval, printSystemStatus, processNum, staticBalanceScheme, searchStrategy, searchStrategyRampUp, smallSize, solLimit, unitWorkNodes, workerMsgLevel, endOfIntParams } |
Integer paramters. More... | |
enum | dblParams { changeWorkThreshold, donorThreshold, hubReportPeriod, masterBalancePeriod, needWorkThreshold, receiverThreshold, timeLimit, tolerance, unitWorkTime, zeroLoad, endOfDblParams } |
Double parameters. More... | |
enum | strParams { instance, logFile, endOfStrParams } |
String parameters. More... | |
enum | strArrayParams { strArrayDummy, endOfStrArrayParams } |
There are no string array parameters. More... | |
Public Member Functions | |
virtual | ~AlpsParams () |
AlpsParams & | operator= (const AlpsParams &x) |
virtual void | createKeywordList () |
Method for creating the list of keyword looked for in the parameter file. More... | |
virtual void | setDefaultEntries () |
Method for setting the default values for the parameters. More... | |
void | setEntry (const boolParams key, const char *val) |
char* is true(1) or false(0), not used More... | |
void | setEntry (const boolParams key, const char val) |
char is true(1) or false(0), not used More... | |
void | setEntry (const boolParams key, const bool val) |
This method is the one that ever been used. More... | |
void | setEntry (const intParams key, const char *val) |
void | setEntry (const intParams key, const int val) |
void | setEntry (const dblParams key, const char *val) |
void | setEntry (const dblParams key, const double val) |
void | setEntry (const strParams key, const char *val) |
void | setEntry (const strArrayParams key, const char *val) |
Constructors. | |
AlpsParams () | |
The default constructor creates a parameter set with from the template argument structure. More... | |
Query methods | |
For user's application: Copy following code exactly (till the end of this class) and do NOT change anything. The reason can not put following functions in base class
| |
bool | entry (const boolParams key) const |
int | entry (const intParams key) const |
double | entry (const dblParams key) const |
const std::string & | entry (const strParams key) const |
const std::vector< std::string > & | entry (const strArrayParams key) const |
Packing/unpacking methods | |
void | pack (AlpsEncoded &buf) |
Pack the parameter set into buf. More... | |
void | unpack (AlpsEncoded &buf) |
Unpack the parameter set from buf. More... | |
![]() | |
void | setEntry (const AlpsParameter key, const char *val) |
First, there is the assignment operator that sets the whole parameter set at once. More... | |
void | readFromStream (std::istream &parstream) |
Read the parameters from the stream specified in the argument. More... | |
void | readFromFile (const char *paramfile) |
Read parameters from a file. More... | |
void | readFromArglist (const int argnum, const char *const *arglist) |
Read parameters from the command line. More... | |
void | writeToStream (std::ostream &outstream) const |
Write keyword-value pairs to the stream specified in the argument. More... | |
AlpsParameterSet (int c, int i, int d, int s, int sa) | |
The constructor allocate memory for parameters. More... | |
virtual | ~AlpsParameterSet () |
The destructor deletes all data members. More... | |
Additional Inherited Members | |
![]() | |
std::vector< std::pair < std::string, AlpsParameter > > | keys_ |
The keyword, parameter pairs. More... | |
std::vector< std::string > | obsoleteKeys_ |
list of obsolete keywords. More... | |
bool * | bpar_ |
The bool parameters. More... | |
int * | ipar_ |
The integer parameters. More... | |
double * | dpar_ |
The double parameters. More... | |
std::string * | spar_ |
The string (actually, std::string) parameters. More... | |
int | numSa_ |
The "vector of string" parameters. More... | |
std::vector< std::string > * | sapar_ |
The keyword, parameter pairs. More... | |
Definition at line 36 of file AlpsParams.h.
Character parameters.
All of these variable are used as booleans (ture = 1, false = 0).
Definition at line 40 of file AlpsParams.h.
Integer paramters.
Definition at line 63 of file AlpsParams.h.
Double parameters.
Definition at line 158 of file AlpsParams.h.
String parameters.
Enumerator | |
---|---|
instance |
The instance to be solved. Default: "NONE" |
logFile |
The name of log file. Default: "Alps.log " |
endOfStrParams |
Definition at line 199 of file AlpsParams.h.
There are no string array parameters.
Enumerator | |
---|---|
strArrayDummy | |
endOfStrArrayParams |
Definition at line 212 of file AlpsParams.h.
|
inline |
The default constructor creates a parameter set with from the template argument structure.
The keyword list is created and the defaults are set.
Definition at line 227 of file AlpsParams.h.
|
inlinevirtual |
Definition at line 241 of file AlpsParams.h.
|
inline |
Definition at line 244 of file AlpsParams.h.
|
virtual |
Method for creating the list of keyword looked for in the parameter file.
Implements AlpsParameterSet.
|
virtual |
Method for setting the default values for the parameters.
Implements AlpsParameterSet.
|
inline |
Definition at line 293 of file AlpsParams.h.
|
inline |
Definition at line 295 of file AlpsParams.h.
|
inline |
Definition at line 297 of file AlpsParams.h.
|
inline |
Definition at line 300 of file AlpsParams.h.
|
inline |
Definition at line 303 of file AlpsParams.h.
|
inline |
char* is true(1) or false(0), not used
Definition at line 309 of file AlpsParams.h.
|
inline |
char is true(1) or false(0), not used
Definition at line 312 of file AlpsParams.h.
|
inline |
This method is the one that ever been used.
Definition at line 315 of file AlpsParams.h.
Definition at line 318 of file AlpsParams.h.
Definition at line 321 of file AlpsParams.h.
Definition at line 324 of file AlpsParams.h.
Definition at line 327 of file AlpsParams.h.
Definition at line 330 of file AlpsParams.h.
|
inline |
Definition at line 333 of file AlpsParams.h.
|
inlinevirtual |
Pack the parameter set into buf.
Reimplemented from AlpsParameterSet.
Definition at line 341 of file AlpsParams.h.
|
inlinevirtual |
Unpack the parameter set from buf.
Reimplemented from AlpsParameterSet.
Definition at line 355 of file AlpsParams.h.