#include <string>
#include <sstream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include "chomp/system/config.h"
#include "chomp/system/textfile.h"
#include "chomp/cubes/cube.h"
#include "chomp/multiwork/mw.h"
#include "config.h"
#include "typedefs.h"
#include "eigenval.h"
Go to the source code of this file.
Classes | |
| class | local_value< T > |
| Initializes the given variable with the value provided and restores the previous value at the end of the current block. More... | |
Functions | |
| bool | fileExists (const char *filename) |
| Returns 'true' iff the given file exists and it is allowed to read it. | |
| template<class intType1, class intType2, class intType3> | |
| bool | internalBoundaryPoint (const intType1 *coord, const intType2 *left, const intType2 *right, const intType3 *limit, int dim) |
| Verifies whether the given box is located at the boundary of the small region which is either not at the boundary of the large region, or is adjacent to some other similar region. | |
| template<class intType> | |
| void | computeParam (const intType *curCoord, double *leftMapParam, double *rightMapParam) |
| Computes the real coordinates of the parameter cube which corresponds to the given box. | |
| parRect * | subRectangles (parCoord *zeroIter, parCoord *maxIter, std::vector< parCoord > *subCoords, int minCount) |
| Determines heuristically an optimal subdivision of a large parameter region into the given minimal number of smaller regions. | |
| template<class intType> | |
| int | countDigits (intType x) |
| Returns the number of digits of the given non-negative integer number. | |
| template<class intType1, class intType2> | |
| std::string | coord2str (const intType1 *coords, const intType2 *maxCoords, int dim) |
| Generates an underscore-separated list of non-negative coordinates padded with zeros to the same width assuming that their values are below the given limits. | |
| template<class intType> | |
| std::string | coord2str (const intType *coords, int dim) |
| Generates an underscore-separated list of non-negative coordinates. | |
| void | coordMinMax (const theMorseDecompositionType &morseDec, spcCoord *coordLeftMin, spcCoord *coordRightMax) |
| Updates the minimal and maximal coordinates of the box which contains all the Morse sets. | |
| template<class typeCubes> | |
| void | subdivideCubes (const typeCubes &X, typeCubes &result) |
| Subdivides one set of cubes to another set of cubes with respect to twice finer grid. | |
| template<class typeCube, class typeCubes> | |
| void | subdivideCube (const typeCube &q, typeCubes &result) |
| Subdivides a cube to a set of cubes with respect to twice finer grid. | |
| template<class typeCubes> | |
| void | embedCubes (const typeCubes &X, typeCubes &result) |
| Embeds a set of cubes to another set of cubes with respect to twice coarser grid. | |
This file contains the definitions of various little useful utility procedures for the Conley-Morse graphs computation software.
Definition in file utils.h.
| void computeParam | ( | const intType * | curCoord, | |
| double * | leftMapParam, | |||
| double * | rightMapParam | |||
| ) | [inline] |
Computes the real coordinates of the parameter cube which corresponds to the given box.
Uses the globally defined ranges.
Definition at line 131 of file utils.h.
References custom::pop3p::paramCount, custom::pop3p::paramDim, custom::pop3p::paramLeft, custom::pop3p::paramRight, custom::pop3p::paramSelect, and custom::pop3p::paramSubdiv.
Referenced by Worker::Process(), and runSingeComp().
| std::string coord2str | ( | const intType * | coords, | |
| int | dim | |||
| ) | [inline] |
| std::string coord2str | ( | const intType1 * | coords, | |
| const intType2 * | maxCoords, | |||
| int | dim | |||
| ) | [inline] |
Generates an underscore-separated list of non-negative coordinates padded with zeros to the same width assuming that their values are below the given limits.
Definition at line 280 of file utils.h.
References countDigits().
Referenced by Coordinator::Prepare(), and Worker::Process().
| void coordMinMax | ( | const theMorseDecompositionType & | morseDec, | |
| spcCoord * | coordLeftMin, | |||
| spcCoord * | coordRightMax | |||
| ) | [inline] |
Updates the minimal and maximal coordinates of the box which contains all the Morse sets.
Definition at line 318 of file utils.h.
References custom::pop3p::spaceDim.
Referenced by Worker::Process(), and runSingeComp().
| int countDigits | ( | intType | x | ) | [inline] |
Returns the number of digits of the given non-negative integer number.
Definition at line 260 of file utils.h.
Referenced by coord2str().
| void embedCubes | ( | const typeCubes & | X, | |
| typeCubes & | result | |||
| ) | [inline] |
| bool fileExists | ( | const char * | filename | ) | [inline] |
Returns 'true' iff the given file exists and it is allowed to read it.
Definition at line 62 of file utils.h.
Referenced by invMorseDec(), Coordinator::Prepare(), and Worker::Process().
| bool internalBoundaryPoint | ( | const intType1 * | coord, | |
| const intType2 * | left, | |||
| const intType2 * | right, | |||
| const intType3 * | limit, | |||
| int | dim | |||
| ) | [inline] |
Verifies whether the given box is located at the boundary of the small region which is either not at the boundary of the large region, or is adjacent to some other similar region.
Definition at line 108 of file utils.h.
Referenced by Worker::Process().
| void subdivideCube | ( | const typeCube & | q, | |
| typeCubes & | result | |||
| ) | [inline] |
| void subdivideCubes | ( | const typeCubes & | X, | |
| typeCubes & | result | |||
| ) | [inline] |
Subdivides one set of cubes to another set of cubes with respect to twice finer grid.
Definition at line 350 of file utils.h.
Referenced by checkEmptyInv(), computeConleyIndex(), computeMorseDecomposition(), and matchMorseSets().
| parRect* subRectangles | ( | parCoord * | zeroIter, | |
| parCoord * | maxIter, | |||
| std::vector< parCoord > * | subCoords, | |||
| int | minCount | |||
| ) | [inline] |
Determines heuristically an optimal subdivision of a large parameter region into the given minimal number of smaller regions.
Fills in the provided array of vectors with the division coordinates. Allocates a rectangle for iterating this region and returns its pointer. Note: The rectangle is built upon the two arrays provided; they should not be deleted or otherwise the pointers stored within the rectangle become invalid.
Definition at line 168 of file utils.h.
References custom::pop3p::paramDim, and custom::pop3p::paramSubdiv.
Referenced by Coordinator::Coordinator().
1.5.3