An object of this class coordinates a series of computations for the Uniform Expansion program. More...
#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. |
An object of this class coordinates a series of computations for the Uniform Expansion program.
This class inherits from the mwCoordinator class to allow network distribution of the work.
Definition at line 58 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] |
unifexp::Coordinator::~Coordinator | ( | ) | [inline] |
int unifexp::Coordinator::Accept | ( | chomp::multiwork::mwData & | data ) | [inline, private] |
int unifexp::Coordinator::numberOfItems | ( | int | level ) | const [inline, private] |
Computes the number of items at the given level.
Definition at line 344 of file coord.h.
Referenced by readResults().
void unifexp::Coordinator::openResults | ( | const char * | filename, |
bool | newFile | ||
) | [inline, private] |
int unifexp::Coordinator::Prepare | ( | 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 198 of file coord.h.
References numberOfItems(), processed, and updateProcessed().
int unifexp::Coordinator::Reject | ( | chomp::multiwork::mwData & | data ) | [inline, private] |
void unifexp::Coordinator::updateProcessed | ( | int | level ) | [inline, private] |
Updates the processet bit vectors to the current level.
Definition at line 354 of file coord.h.
Referenced by readResults().
int unifexp::Coordinator::computeC [private] |
int unifexp::Coordinator::computeDelta [private] |
int unifexp::Coordinator::computeDelta0 [private] |
int unifexp::Coordinator::computeLambda [private] |
int unifexp::Coordinator::computeLambda0 [private] |
int unifexp::Coordinator::controlNumber [private] |
int unifexp::Coordinator::currentItem [private] |
int unifexp::Coordinator::currentLevel [private] |
double unifexp::Coordinator::deltaMax [private] |
double unifexp::Coordinator::deltaMin [private] |
std::ofstream unifexp::Coordinator::f [private] |
int unifexp::Coordinator::finalLevel [private] |
bool unifexp::Coordinator::flushfile [private] |
int unifexp::Coordinator::hiprec [private] |
bool unifexp::Coordinator::intervals [private] |
double unifexp::Coordinator::lambdaMax [private] |
double unifexp::Coordinator::lambdaMin [private] |
int unifexp::Coordinator::loprec [private] |
std::string unifexp::Coordinator::mapName [private] |
double unifexp::Coordinator::paramMax [private] |
double unifexp::Coordinator::paramMin [private] |
int unifexp::Coordinator::partCountMax [private] |
int unifexp::Coordinator::partCountMin [private] |
std::string unifexp::Coordinator::partName [private] |
std::vector<bitVector *> unifexp::Coordinator::processed [private] |
double unifexp::Coordinator::resolution [private] |
int unifexp::Coordinator::rigorous [private] |
bool unifexp::Coordinator::singleItem [private] |
int unifexp::Coordinator::sparseGraph [private] |
int unifexp::Coordinator::startLevel [private] |