#include </cur/unifexp/coord.h>
Public Member Functions | |
Coordinator (int _controlNumber, const char *_filename, bool _flushfile, double _paramMin, double _paramMax, bool _intervals, double _deltaMin, double _deltaMax, double _resolution, double _lambdaMin, double _lambdaMax, const char *_mapName, const char *_partName, int _partCountMin, int _partCountMax, int _startLevel, int _finalLevel, int _computeDelta, int _computeDelta0, int _computeLambda, int _computeC, int _computeLambda0, int _rigorous, int _sparseGraph) | |
The complete constructor of a coordinator. | |
~Coordinator () | |
The destructor of the coordinator. | |
Private Member Functions | |
int | Prepare (chomp::multiwork::mwData &data) |
A function for preparing data by a coordinator. | |
int | Accept (chomp::multiwork::mwData &data) |
A function for accepting results by a coordinator. | |
int | Reject (chomp::multiwork::mwData &data) |
A function for taking rejected data by a coordinator. | |
bool | readResults (const char *filename) |
Reads the previously computed results from the input file. | |
void | openResults (const char *filename, bool newFile) |
Opens a file with the results for appending or creates the file. | |
int | numberOfItems (int level) const |
Computes the number of items at the given level. | |
void | updateProcessed (int level) |
Updates the processet bit vectors to the current level. | |
Private Attributes | |
int | controlNumber |
The control number to recognize compatible workers. | |
std::ofstream | f |
A file to append the results to. | |
bool | flushfile |
Should the results file be flushed after every write? | |
double | paramMin |
The minimal value of the parameter 'a' to investigate. | |
double | paramMax |
The maximal value of the parameter 'a' to investigate. | |
bool | intervals |
Should the entire intervals of parameters be processed? | |
double | deltaMin |
The minimal value of delta if fixed. | |
double | deltaMax |
The maximal value of delta if fixed. | |
double | resolution |
The resolution with which lambda must be found. | |
double | lambdaMin |
The minimal value of lambda if requested. | |
double | lambdaMax |
The maximal value of lambda if requested. | |
std::string | mapName |
The map type name. | |
std::string | partName |
The partition type name. | |
int | partCountMin |
The minimal size of the partition. | |
int | partCountMax |
The maximal size of the partition. | |
int | currentLevel |
The currently processed level. | |
int | currentItem |
The current element at the given level. | |
int | startLevel |
The starting subdivision level. | |
int | finalLevel |
The final subdivision level. | |
bool | singleItem |
Is there just one single parameter combination to be processed? | |
int | computeDelta |
Should delta be computed? | |
int | computeDelta0 |
Should delta0 be computed? (with paths in consideration). | |
int | computeLambda |
Should lambda be computed? | |
int | computeC |
Should C be computed? | |
int | computeLambda0 |
Should lambda0 be computed? | |
int | rigorous |
Should the computations be rigorous? | |
int | sparseGraph |
Should a sparse graph algorithm be used? [0=no, 1=yes, -1=auto]. | |
std::vector < bitVector * > | processed |
The bit fields for each level. | |
int | loprec |
The low precision for writing real numbers to files. | |
int | hiprec |
The high precision for writing real numbers to files. |
This class inherits from the mwCoordinator class to allow network distribution of the work.
Definition at line 60 of file coord.h.
unifexp::Coordinator::Coordinator | ( | int | _controlNumber, | |
const char * | _filename, | |||
bool | _flushfile, | |||
double | _paramMin, | |||
double | _paramMax, | |||
bool | _intervals, | |||
double | _deltaMin, | |||
double | _deltaMax, | |||
double | _resolution, | |||
double | _lambdaMin, | |||
double | _lambdaMax, | |||
const char * | _mapName, | |||
const char * | _partName, | |||
int | _partCountMin, | |||
int | _partCountMax, | |||
int | _startLevel, | |||
int | _finalLevel, | |||
int | _computeDelta, | |||
int | _computeDelta0, | |||
int | _computeLambda, | |||
int | _computeC, | |||
int | _computeLambda0, | |||
int | _rigorous, | |||
int | _sparseGraph | |||
) | [inline] |
The complete constructor of a coordinator.
Definition at line 271 of file coord.h.
References currentLevel, deltaMax, deltaMin, finalLevel, intervals, lambdaMax, lambdaMin, openResults(), paramMax, paramMin, partCountMax, partCountMin, readResults(), singleItem, and startLevel.
unifexp::Coordinator::~Coordinator | ( | ) | [inline] |
int unifexp::Coordinator::Prepare | ( | chomp::multiwork::mwData & | data | ) | [inline, private] |
A function for preparing data by a coordinator.
Definition at line 370 of file coord.h.
References computeC, computeDelta, computeDelta0, computeLambda, computeLambda0, controlNumber, currentItem, currentLevel, deltaMax, deltaMin, finalLevel, hiprec, intervals, lambdaMax, lambdaMin, loprec, mapName, numberOfItems(), paramMax, paramMin, partCountMax, partCountMin, partName, processed, resolution, rigorous, sparseGraph, startLevel, and updateProcessed().
int unifexp::Coordinator::Accept | ( | chomp::multiwork::mwData & | data | ) | [inline, private] |
int unifexp::Coordinator::Reject | ( | chomp::multiwork::mwData & | data | ) | [inline, private] |
bool unifexp::Coordinator::readResults | ( | const char * | filename | ) | [inline, private] |
Reads the previously computed results from the input file.
Returns true if successful, false if no results file exists.
Definition at line 200 of file coord.h.
References numberOfItems(), processed, and updateProcessed().
Referenced by Coordinator().
void unifexp::Coordinator::openResults | ( | const char * | filename, | |
bool | newFile | |||
) | [inline, private] |
int unifexp::Coordinator::numberOfItems | ( | int | level | ) | const [inline, private] |
Computes the number of items at the given level.
Definition at line 350 of file coord.h.
References intervals, singleItem, and startLevel.
Referenced by Prepare(), readResults(), and updateProcessed().
void unifexp::Coordinator::updateProcessed | ( | int | level | ) | [inline, private] |
Updates the processet bit vectors to the current level.
Definition at line 360 of file coord.h.
References numberOfItems(), and processed.
Referenced by Prepare(), and readResults().
int unifexp::Coordinator::controlNumber [private] |
std::ofstream unifexp::Coordinator::f [private] |
A file to append the results to.
Definition at line 94 of file coord.h.
Referenced by Accept(), openResults(), and ~Coordinator().
bool unifexp::Coordinator::flushfile [private] |
double unifexp::Coordinator::paramMin [private] |
The minimal value of the parameter 'a' to investigate.
Definition at line 100 of file coord.h.
Referenced by Coordinator(), and Prepare().
double unifexp::Coordinator::paramMax [private] |
The maximal value of the parameter 'a' to investigate.
Definition at line 103 of file coord.h.
Referenced by Coordinator(), and Prepare().
bool unifexp::Coordinator::intervals [private] |
Should the entire intervals of parameters be processed?
Definition at line 106 of file coord.h.
Referenced by Coordinator(), numberOfItems(), and Prepare().
double unifexp::Coordinator::deltaMin [private] |
The minimal value of delta if fixed.
Definition at line 109 of file coord.h.
Referenced by Coordinator(), and Prepare().
double unifexp::Coordinator::deltaMax [private] |
The maximal value of delta if fixed.
Definition at line 112 of file coord.h.
Referenced by Coordinator(), and Prepare().
double unifexp::Coordinator::resolution [private] |
double unifexp::Coordinator::lambdaMin [private] |
The minimal value of lambda if requested.
Definition at line 118 of file coord.h.
Referenced by Coordinator(), and Prepare().
double unifexp::Coordinator::lambdaMax [private] |
The maximal value of lambda if requested.
Definition at line 121 of file coord.h.
Referenced by Coordinator(), and Prepare().
std::string unifexp::Coordinator::mapName [private] |
std::string unifexp::Coordinator::partName [private] |
int unifexp::Coordinator::partCountMin [private] |
The minimal size of the partition.
Definition at line 130 of file coord.h.
Referenced by Coordinator(), and Prepare().
int unifexp::Coordinator::partCountMax [private] |
The maximal size of the partition.
Definition at line 133 of file coord.h.
Referenced by Coordinator(), and Prepare().
int unifexp::Coordinator::currentLevel [private] |
The currently processed level.
Definition at line 146 of file coord.h.
Referenced by Coordinator(), and Prepare().
int unifexp::Coordinator::currentItem [private] |
int unifexp::Coordinator::startLevel [private] |
The starting subdivision level.
Definition at line 152 of file coord.h.
Referenced by Coordinator(), numberOfItems(), and Prepare().
int unifexp::Coordinator::finalLevel [private] |
The final subdivision level.
Definition at line 155 of file coord.h.
Referenced by Coordinator(), and Prepare().
bool unifexp::Coordinator::singleItem [private] |
Is there just one single parameter combination to be processed?
Definition at line 158 of file coord.h.
Referenced by Coordinator(), and numberOfItems().
int unifexp::Coordinator::computeDelta [private] |
int unifexp::Coordinator::computeDelta0 [private] |
int unifexp::Coordinator::computeLambda [private] |
int unifexp::Coordinator::computeC [private] |
int unifexp::Coordinator::computeLambda0 [private] |
int unifexp::Coordinator::rigorous [private] |
int unifexp::Coordinator::sparseGraph [private] |
std::vector<bitVector *> unifexp::Coordinator::processed [private] |
The bit fields for each level.
Definition at line 182 of file coord.h.
Referenced by Prepare(), readResults(), updateProcessed(), and ~Coordinator().
int unifexp::Coordinator::loprec [private] |
The low precision for writing real numbers to files.
Definition at line 185 of file coord.h.
Referenced by Accept(), openResults(), and Prepare().
int unifexp::Coordinator::hiprec [private] |
The high precision for writing real numbers to files.
Definition at line 188 of file coord.h.
Referenced by Accept(), openResults(), and Prepare().