33#ifndef _CMGRAPHS_MAPCOMP_T_H_ 
   34#define _CMGRAPHS_MAPCOMP_T_H_ 
   45#include "chomp/system/textfile.h" 
   46#include "chomp/system/timeused.h" 
   47#include "chomp/struct/autoarray.h" 
   48#include "chomp/struct/digraph.h" 
   69template <
class mapcomp, 
class cubetype,
 
   70        class cubsettype = chomp::homology::hashedset<cubetype> >
 
   77                int _intwidth, 
int _subdivdepth,
 
   78                const mapcomp &_M = mapcomp ());
 
   87        int operator () (
const cubetype &q, cubsettype *img,
 
   88                chomp::homology::diGraph<> *g, 
const cubsettype *codomain,
 
   89                const cubsettype *
disjoint, 
bool throwIfCropped) 
const;
 
   95template <
class mapcomp, 
class cubetype, 
class cubsettype>
 
   97        (
const double *_offset, 
const double *_width,
 
   98        int _intwidth, 
int _subdivdepth, 
const mapcomp &_M):
 
  100        (_offset, _width, _intwidth, _subdivdepth, _M)
 
  105template <
class mapcomp, 
class cubetype, 
class cubsettype>
 
  107        (
const cubetype &q, cubsettype *img,
 
  108        chomp::homology::diGraph<> *g, 
const cubsettype *codomain,
 
  109        const cubsettype *
disjoint, 
bool throwIfCropped) 
const 
  111        using chomp::homology::auto_array;
 
  113        typedef typename cubetype::CoordType CoordType;
 
  116        auto_array<CoordType> coordPtr (
new CoordType [
spaceDim]);
 
  117        CoordType *coord (coordPtr. get ());
 
  125                x [i] /= 
this -> intwidth;
 
  126                x [i] *= 
this -> width [i];
 
  127                x [i] += 
this -> offset [i];
 
  133        this -> M. compute (x, rectSet, 
spaceDim, coord,
 
  134                this -> subdivdepth);
 
  142                boundingBox [i] -= 
this -> offset [i];
 
  143                boundingBox [i] /= 
this -> width [i];
 
  144                boundingBox [i] *= 
this -> intwidth;
 
  149        auto_array<CoordType> leftPtr (
new CoordType [
spaceDim]);
 
  150        CoordType *left = leftPtr. get ();
 
  151        auto_array<CoordType> rightPtr (
new CoordType [
spaceDim]);
 
  152        CoordType *right = rightPtr. get ();
 
  155        this -> encloseIntervalInt (boundingBox, 
spaceDim, left, right);
 
  158        if (
this -> cropping)
 
  161                        throwIfCropped, 
this -> cropped);
 
  166                this -> maxImgDiam, 
this -> maxImgVol,
 
  167                this -> maxImgDiamAllowed, 
this -> maxImgVolAllowed);
 
  170        auto_array<CoordType> intWidthPtr (
new CoordType [
spaceDim]);
 
  171        CoordType *intWidth (intWidthPtr. get ());
 
  173                intWidth [i] = 
this -> intwidth;
 
  176        bool usingImg = img && img -> empty ();
 
  178        cubsettype &image (usingImg ? *img : localImg);
 
  181        coverRectSet (rectSet, 
this -> offset, 
this -> width, intWidth,
 
  187                int_t imgSize = image. size ();
 
  188                for (int_t i = 0; i < imgSize; ++ i)
 
  190                        const cubetype &qImg (image [i]);
 
  191                        int n = codomain -> getnumber (qImg);
 
  193                                throw "An edge to outside the codomain found.";
 
A generic map computation routine that computes a rigorous cubical multivalued map based on a functio...
 
The generic map computation routine that computes a rigorous cubical multivalued map based on a funct...
 
MapComputationTight(const double *_offset, const double *_width, int _intwidth, int _subdivdepth, const mapcomp &_M=mapcomp())
The default constructor.
 
int operator()(const cubetype &q, cubsettype *img, chomp::homology::diGraph<> *g, const cubsettype *codomain, const cubsettype *disjoint, bool throwIfCropped) const
The operator for computing the image of a box as a set of boxes, as it is in a combinatorial cubical ...
 
Choice of configuration settings.
 
Covering a rotated rectangular set or a paralellepiped with cubes with respect to a fixed grid in R^n...
 
void coverRectSet(const RectSetType &rectSet, const DoubleArray1 &offset, const DoubleArray2 &width, const CoordType *intWidth, int dim, CubSetType &image, const CoordType *left, const CoordType *right, const CubSetType *codomain, const CubSetType *disjoint)
Covers a rectangular set by cubes with respect to a uniform subdivision of a rectangular area defined...
 
bool disjoint(const pointset &p, const pointset &q)
 
Map computation routines.
 
Map computation distance checker.
 
const int spaceDim
The dimension of the phase space.
 
Customizable data types for the Conley-Morse graphs computation program.
 
Data types for interval arithmetic.
 
void resetRounding()
This function resets rounding switches of the processor and sets rounding to the nearest.
 
capd::DInterval IntervalType
The type of an interval (from the CAPD library 2.9/3.0 beta).
 
capd::C0HORect2Set RectSetType
The type of the rectangular set to use.
 
capd::IVector IntervalVectorType
The interval vector type for creating the rectangular set by means of its center + box.
 
Utilites and helper functions.
 
void cropRanges(CoordType *left, CoordType *right, int dim, int intwidth, bool throwIfCropped, bool &cropped)
Crops the ranges, marks this fact if it occurred, and throws an exception if requested to.
 
long checkImageSize(const CoordType *left, const CoordType *right, int dim, int &maxImgDiam, int &maxImgVol, int maxImgDiamAllowed, int maxImgVolAllowed)
Checks if the size of the image does not exceed the globally defined maximal diameter and maximal vol...