The Conley-Morse Graphs Software
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
MapComputation< mapcomp, cubetype, cubsettype > Class Template Reference

A generic map computation routine that computes a rigorous cubical multivalued map based on a function that computes the image of intervals using interval arithmetic. More...

#include <mapcomp.h>

Public Types

typedef mapcomp MapCompType
 The type of the underlying interval map. More...
 
typedef chomp::homology::diGraph GraphType
 The type of the graph used in the computation of the image. More...
 

Public Member Functions

 MapComputation (const double *_offset, const double *_width, int _intwidth, int _subdivdepth, const mapcomp &_M)
 The default constructor. More...
 
 ~MapComputation ()
 The destructor. More...
 
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 multivalued map. More...
 
int intWidth () const
 Returns the width of the phase space in terms of the number of boxes. More...
 
int subdivDepth () const
 Returns the subdivision depth at which the computations are done. More...
 
void cleanCache () const
 Cleans the cache of the cubical map, e.g., if the underlying interval map has changed. More...
 

Static Public Member Functions

template<class IntervalArray >
static void encloseIntervalInt (const IntervalArray &box, int dim, typename cubetype::CoordType *left, typename cubetype::CoordType *right)
 A helper function that encloses an interval box in the interior of a box with integer coordinates. More...
 
static void setAllowedImgSize (int diameter, int volume)
 Sets new (more or less restrictive) limits for the maximal allowed image diameter and volume. More...
 

Public Attributes

const mapcomp & M
 The map used to compute an interval enclosure of the image of an interval box. More...
 
bool cache
 Using cache for the map. More...
 
bool cropping
 Is cropping of images to the designated box in effect? More...
 
bool cropped
 Was the image cropped at least once? Reset this variable to "false" in order to detect image cropping again. More...
 

Static Public Attributes

static int maxImgDiam
 The maximal image diameter encountered so far. More...
 
static int maxImgVol
 The maximal image volume encountered so far. More...
 

Protected Member Functions

int compute (const typename cubetype::CoordType *coord, int dim, typename cubetype::CoordType *left, typename cubetype::CoordType *right, IntervalType *scaledImage) const
 Use interval arithmetic to compute the coordinate scope. More...
 

Protected Attributes

const double * offset
 The offset of the cubical rectangle. More...
 
const double * width
 The width of the rectangle in each direction. More...
 
int intwidth
 The width of the rectangle in terms of the number of cubes. More...
 
int subdivdepth
 The binary subdivision depth. More...
 

Static Protected Attributes

static int maxImgDiamAllowed
 The maximal allowed image diameter. More...
 
static int maxImgVolAllowed
 The maximal allowed image volume. More...
 

Private Attributes

int_t cacheused
 The number of times the cache was used successfully. More...
 
cubsettype computed
 The cache domain. More...
 
chomp::homology::multitable< cubetype > leftcache
 The cache left vertex. More...
 
chomp::homology::multitable< cubetype > rightcache
 The cache right vertex. More...
 
chomp::homology::multitable< IntervalType * > imagecache
 The cached interval vectors for images. More...
 
MapDistance< cubetype, cubsettype > checkDistance
 Map distance measuring object. More...
 

Detailed Description

template<class mapcomp, class cubetype, class cubsettype = chomp::homology::hashedset<cubetype>>
class MapComputation< mapcomp, cubetype, cubsettype >

A generic map computation routine that computes a rigorous cubical multivalued map based on a function that computes the image of intervals using interval arithmetic.

The "mapcomp" class must have a method called "compute" which is used to compute the map in interval arithmetic.

Definition at line 68 of file mapcomp.h.

Member Typedef Documentation

◆ GraphType

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
typedef chomp::homology::diGraph MapComputation< mapcomp, cubetype, cubsettype >::GraphType

The type of the graph used in the computation of the image.

Definition at line 75 of file mapcomp.h.

◆ MapCompType

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
typedef mapcomp MapComputation< mapcomp, cubetype, cubsettype >::MapCompType

The type of the underlying interval map.

Definition at line 72 of file mapcomp.h.

Constructor & Destructor Documentation

◆ MapComputation()

template<class mapcomp , class cubetype , class cubsettype >
MapComputation< mapcomp, cubetype, cubsettype >::MapComputation ( const double *  _offset,
const double *  _width,
int  _intwidth,
int  _subdivdepth,
const mapcomp &  _M 
)
inline

The default constructor.

Remembers the offset and width of the phase space, and the width (the same in each direction) in integers. Note: 'intwidth' does not have to be a power of 2. Note: The arrays of the offset and width of the phase space must exist until the object is deleted; the same for the map.

Definition at line 219 of file mapcomp.h.

References testIntervals().

◆ ~MapComputation()

template<class mapcomp , class cubetype , class cubsettype >
MapComputation< mapcomp, cubetype, cubsettype >::~MapComputation
inline

The destructor.

Definition at line 232 of file mapcomp.h.

Member Function Documentation

◆ cleanCache()

template<class mapcomp , class cubetype , class cubsettype >
void MapComputation< mapcomp, cubetype, cubsettype >::cleanCache
inline

Cleans the cache of the cubical map, e.g., if the underlying interval map has changed.

Definition at line 569 of file mapcomp.h.

◆ compute()

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::compute ( const typename cubetype::CoordType *  coord,
int  dim,
typename cubetype::CoordType *  left,
typename cubetype::CoordType *  right,
IntervalType scaledImage 
) const
inlineprotected

Use interval arithmetic to compute the coordinate scope.

The image scaled to the interval grid may be saved if an array of intervals is provided. Note: 'coord' may point to the same location as 'left' or 'right'.

Definition at line 302 of file mapcomp.h.

References resetRounding().

◆ encloseIntervalInt()

template<class mapcomp , class cubetype , class cubsettype >
template<class IntervalArray >
void MapComputation< mapcomp, cubetype, cubsettype >::encloseIntervalInt ( const IntervalArray &  box,
int  dim,
typename cubetype::CoordType *  left,
typename cubetype::CoordType *  right 
)
inlinestatic

A helper function that encloses an interval box in the interior of a box with integer coordinates.

Definition at line 268 of file mapcomp.h.

◆ intWidth()

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::intWidth
inline

Returns the width of the phase space in terms of the number of boxes.

Definition at line 555 of file mapcomp.h.

◆ operator()()

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::operator() ( const cubetype &  q,
cubsettype *  img,
chomp::homology::diGraph<> *  g,
const cubsettype *  codomain,
const cubsettype *  disjoint,
bool  throwIfCropped 
) const
inline

The operator for computing the image of a box as a set of boxes, as it is in a combinatorial cubical multivalued map.

The image is restricted to the given codomain (if provided). The integral coefficients of cubes are transformed to real numbers according to the rectangular area defined by offset from the origin and its width, as well as the width of this area in terms of integral coordinates.

Definition at line 362 of file mapcomp.h.

References checkImageSize(), cropRanges(), disjoint(), and intersectionVolume().

◆ setAllowedImgSize()

template<class mapcomp , class cubetype , class cubsettype >
void MapComputation< mapcomp, cubetype, cubsettype >::setAllowedImgSize ( int  diameter,
int  volume 
)
inlinestatic

Sets new (more or less restrictive) limits for the maximal allowed image diameter and volume.

Definition at line 577 of file mapcomp.h.

◆ subdivDepth()

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::subdivDepth
inline

Returns the subdivision depth at which the computations are done.

Definition at line 562 of file mapcomp.h.

Member Data Documentation

◆ cache

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
bool MapComputation< mapcomp, cubetype, cubsettype >::cache

Using cache for the map.

Definition at line 106 of file mapcomp.h.

◆ cacheused

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
int_t MapComputation< mapcomp, cubetype, cubsettype >::cacheused
mutableprivate

The number of times the cache was used successfully.

Definition at line 176 of file mapcomp.h.

◆ checkDistance

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
MapDistance<cubetype,cubsettype> MapComputation< mapcomp, cubetype, cubsettype >::checkDistance
private

Map distance measuring object.

This is an auxiliary object for gathering information on the distance of a cube from certain subspaces in comparison to the distance of its image. Please, see the definition of this class for more details.

Definition at line 196 of file mapcomp.h.

◆ computed

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
cubsettype MapComputation< mapcomp, cubetype, cubsettype >::computed
mutableprivate

The cache domain.

Definition at line 179 of file mapcomp.h.

◆ cropped

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
bool MapComputation< mapcomp, cubetype, cubsettype >::cropped
mutable

Was the image cropped at least once? Reset this variable to "false" in order to detect image cropping again.

Definition at line 113 of file mapcomp.h.

◆ cropping

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
bool MapComputation< mapcomp, cubetype, cubsettype >::cropping
mutable

Is cropping of images to the designated box in effect?

Definition at line 109 of file mapcomp.h.

◆ imagecache

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
chomp::homology::multitable<IntervalType *> MapComputation< mapcomp, cubetype, cubsettype >::imagecache
mutableprivate

The cached interval vectors for images.

Definition at line 188 of file mapcomp.h.

◆ intwidth

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
int MapComputation< mapcomp, cubetype, cubsettype >::intwidth
protected

The width of the rectangle in terms of the number of cubes.

Definition at line 153 of file mapcomp.h.

◆ leftcache

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
chomp::homology::multitable<cubetype> MapComputation< mapcomp, cubetype, cubsettype >::leftcache
mutableprivate

The cache left vertex.

Definition at line 182 of file mapcomp.h.

◆ M

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
const mapcomp& MapComputation< mapcomp, cubetype, cubsettype >::M

The map used to compute an interval enclosure of the image of an interval box.

Definition at line 79 of file mapcomp.h.

◆ maxImgDiam

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::maxImgDiam
static

The maximal image diameter encountered so far.

Set this variable to zero to gather meaningful information.

Definition at line 117 of file mapcomp.h.

Referenced by Worker::Process(), runMapComp(), and runSingleComp().

◆ maxImgDiamAllowed

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::maxImgDiamAllowed
staticprotected

The maximal allowed image diameter.

Definition at line 169 of file mapcomp.h.

◆ maxImgVol

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::maxImgVol
static

The maximal image volume encountered so far.

Set this variable to zero to gather meaningful information.

Definition at line 121 of file mapcomp.h.

Referenced by Worker::Process(), runMapComp(), and runSingleComp().

◆ maxImgVolAllowed

template<class mapcomp , class cubetype , class cubsettype >
int MapComputation< mapcomp, cubetype, cubsettype >::maxImgVolAllowed
staticprotected

The maximal allowed image volume.

Definition at line 172 of file mapcomp.h.

◆ offset

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
const double* MapComputation< mapcomp, cubetype, cubsettype >::offset
protected

The offset of the cubical rectangle.

Definition at line 147 of file mapcomp.h.

◆ rightcache

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
chomp::homology::multitable<cubetype> MapComputation< mapcomp, cubetype, cubsettype >::rightcache
mutableprivate

The cache right vertex.

Definition at line 185 of file mapcomp.h.

◆ subdivdepth

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
int MapComputation< mapcomp, cubetype, cubsettype >::subdivdepth
protected

The binary subdivision depth.

Definition at line 156 of file mapcomp.h.

◆ width

template<class mapcomp , class cubetype , class cubsettype = chomp::homology::hashedset<cubetype>>
const double* MapComputation< mapcomp, cubetype, cubsettype >::width
protected

The width of the rectangle in each direction.

Definition at line 150 of file mapcomp.h.


The documentation for this class was generated from the following file: