unifexp::Coordinator Class Reference

An object of this class coordinates a series of computations for the Uniform Expansion program. More...

#include </cur/unifexp/coord.h>

List of all members.

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.


Detailed Description

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 60 of file coord.h.


Constructor & Destructor Documentation

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]

The destructor of the coordinator.

Definition at line 336 of file coord.h.

References f, and processed.


Member Function Documentation

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]

A function for accepting results by a coordinator.

Definition at line 459 of file coord.h.

References controlNumber, f, flushfile, hiprec, and loprec.

int unifexp::Coordinator::Reject ( chomp::multiwork::mwData &  data  )  [inline, private]

A function for taking rejected data by a coordinator.

Definition at line 514 of file coord.h.

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]

Opens a file with the results for appending or creates the file.

If this is a new file then some introductory info is written.

Definition at line 243 of file coord.h.

References f, hiprec, and loprec.

Referenced by Coordinator().

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().


Member Data Documentation

int unifexp::Coordinator::controlNumber [private]

The control number to recognize compatible workers.

Definition at line 91 of file coord.h.

Referenced by Accept(), and Prepare().

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]

Should the results file be flushed after every write?

Definition at line 97 of file coord.h.

Referenced by Accept().

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]

The resolution with which lambda must be found.

Definition at line 115 of file coord.h.

Referenced by Prepare().

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]

The map type name.

Definition at line 124 of file coord.h.

Referenced by Prepare().

std::string unifexp::Coordinator::partName [private]

The partition type name.

Definition at line 127 of file coord.h.

Referenced by Prepare().

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]

The current element at the given level.

Definition at line 149 of file coord.h.

Referenced by Prepare().

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]

Should delta be computed?

Definition at line 161 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::computeDelta0 [private]

Should delta0 be computed? (with paths in consideration).

Definition at line 164 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::computeLambda [private]

Should lambda be computed?

Definition at line 167 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::computeC [private]

Should C be computed?

Definition at line 170 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::computeLambda0 [private]

Should lambda0 be computed?

Definition at line 173 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::rigorous [private]

Should the computations be rigorous?

Definition at line 176 of file coord.h.

Referenced by Prepare().

int unifexp::Coordinator::sparseGraph [private]

Should a sparse graph algorithm be used? [0=no, 1=yes, -1=auto].

Definition at line 179 of file coord.h.

Referenced by Prepare().

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().


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 11:08:42 2007 for The Uniform Expansion Software by  doxygen 1.5.3