The Finite Resolution Dynamics Software
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
tCoverBoxes< NumType > Class Template Reference

A cover of a subset in R^n consisting of open boxes. More...

#include <covboxes.h>

Public Types

typedef NumType NumberType
 The type of numbers in the Henon map. More...
 

Public Member Functions

 tCoverBoxes (const int spaceDim, const NumType *leftCorner, const NumType *boxWidths, const int *partCounts, const NumType *overlap=0)
 The constructor of an open cover object. More...
 
 ~tCoverBoxes ()
 The destructor of an open cover object. More...
 
int dim () const
 Returns the dimension of the phase space. More...
 
int size () const
 Returns the number of boxes in the cover. More...
 
template<class ResultType >
void get (const int n, ResultType *leftBounds, ResultType *rightBounds) const
 Returns the coordinates of the given box. More...
 
template<class ResultType >
void getLeftCorner (ResultType *leftCorner) const
 Returns the coordinates of the left corner of the range box. More...
 
template<class ResultType >
void getBoxWidths (ResultType *boxWidths) const
 Returns the width of the range box in each direction. More...
 
template<class InputType , class BoxNumbers >
void cover (const InputType *leftBounds, const InputType *rightBounds, BoxNumbers &boxNumbers, NumType *diameter2=0)
 Covers the given box and adds numbers of all the boxes in the cover to a list using the provided class object with its method "add". More...
 
template<class InputType >
void cover (const InputType *x)
 Covers a given point with open boxes. More...
 
void forget ()
 Forgets the cover elements. More...
 

Private Types

typedef int CoordType
 The type of integer coordinates for boxes that represent cover elements. More...
 
typedef chomp::homology::tCubeBase< CoordTypeCubeType
 The type of a cube that represents a cover element. More...
 

Private Member Functions

NumType leftBound (int coord, int dir) const
 Computes the real left coordinate in the given direction of a box represented by integer coordinates. More...
 
NumType rightBound (int coord, int dir) const
 Computes the real right coordinate in the given direction of a box represented by integer coordinates. More...
 
CoordType leftCoord (const NumType &bound, int dir) const
 Computes the left coordinate in the given direction of the leftmost box to cover the given real coordinate. More...
 
CoordType rightCoord (const NumType &bound, int dir) const
 Computes the right coordinate in the given direction of the rightmost box to cover the given real coordinate. More...
 
 tCoverBoxes (const tCoverBoxes< NumType > &)
 The copy constructor should not be used. More...
 
tCoverBoxes< NumType > & operator= (const tCoverBoxes< NumType > &)
 The assignment operator should not be used. More...
 

Private Attributes

int spaceDim
 The dimension of the space. More...
 
NumType * leftCorner
 The lower left corner of the covered rectangle. More...
 
NumType * boxWidths
 The widths of the covered rectangle in all the directions. More...
 
NumType * rightCorner
 The upper right corner of the covered rectangle. More...
 
int * partCounts
 The numbers of parts into which the box is subdivided in each direction. More...
 
NumType * overlap
 The minimal overlap width. More...
 
CoordTypebuffer
 A temporary buffer for the coordinates of two cubes. More...
 
chomp::homology::hashedset< CubeTypeboxes
 The set of boxes in the cover. More...
 

Detailed Description

template<class NumType>
class tCoverBoxes< NumType >

A cover of a subset in R^n consisting of open boxes.

Definition at line 73 of file covboxes.h.

Member Typedef Documentation

◆ CoordType

template<class NumType>
typedef int tCoverBoxes< NumType >::CoordType
private

The type of integer coordinates for boxes that represent cover elements.

Definition at line 149 of file covboxes.h.

◆ CubeType

template<class NumType>
typedef chomp::homology::tCubeBase<CoordType> tCoverBoxes< NumType >::CubeType
private

The type of a cube that represents a cover element.

Definition at line 155 of file covboxes.h.

◆ NumberType

template<class NumType>
typedef NumType tCoverBoxes< NumType >::NumberType

The type of numbers in the Henon map.

Definition at line 77 of file covboxes.h.

Constructor & Destructor Documentation

◆ tCoverBoxes() [1/2]

template<class NumType >
tCoverBoxes< NumType >::tCoverBoxes ( const int  spaceDim,
const NumType *  leftCorner,
const NumType *  boxWidths,
const int *  partCounts,
const NumType *  overlap = 0 
)
inline

The constructor of an open cover object.

Definition at line 187 of file covboxes.h.

References tRounding< NumType >::min_number().

◆ ~tCoverBoxes()

template<class NumType >
tCoverBoxes< NumType >::~tCoverBoxes ( )
inline

The destructor of an open cover object.

Definition at line 272 of file covboxes.h.

◆ tCoverBoxes() [2/2]

template<class NumType >
tCoverBoxes< NumType >::tCoverBoxes ( const tCoverBoxes< NumType > &  )
inlineprivate

The copy constructor should not be used.

Definition at line 257 of file covboxes.h.

Member Function Documentation

◆ cover() [1/2]

template<class NumType >
template<class InputType , class BoxNumbers >
void tCoverBoxes< NumType >::cover ( const InputType *  leftBounds,
const InputType *  rightBounds,
BoxNumbers &  boxNumbers,
NumType *  diameter2 = 0 
)
inline

Covers the given box and adds numbers of all the boxes in the cover to a list using the provided class object with its method "add".

Adds boxes necessary to cover the rectangle to the cover if they are not there yet. Throws an exception if the predefined bounds of the covered rectangular box have been exceeded. If requested, comptues a rigorous upper bound for the square of the diameter of the cover.

Definition at line 466 of file covboxes.h.

References DummyBoxNumbers::add().

◆ cover() [2/2]

template<class NumType >
template<class InputType >
void tCoverBoxes< NumType >::cover ( const InputType *  x)
inline

Covers a given point with open boxes.

Definition at line 520 of file covboxes.h.

◆ dim()

template<class NumType >
int tCoverBoxes< NumType >::dim ( ) const
inline

Returns the dimension of the phase space.

Definition at line 284 of file covboxes.h.

◆ forget()

template<class NumType >
void tCoverBoxes< NumType >::forget ( )
inline

Forgets the cover elements.

Definition at line 296 of file covboxes.h.

◆ get()

template<class NumType >
template<class ResultType >
void tCoverBoxes< NumType >::get ( const int  n,
ResultType *  leftBounds,
ResultType *  rightBounds 
) const
inline

Returns the coordinates of the given box.

Throws an exception if the box with this number is undefined.

Definition at line 421 of file covboxes.h.

◆ getBoxWidths()

template<class NumType >
template<class ResultType >
void tCoverBoxes< NumType >::getBoxWidths ( ResultType *  boxWidths) const
inline

Returns the width of the range box in each direction.

Definition at line 456 of file covboxes.h.

◆ getLeftCorner()

template<class NumType >
template<class ResultType >
void tCoverBoxes< NumType >::getLeftCorner ( ResultType *  leftCorner) const
inline

Returns the coordinates of the left corner of the range box.

Definition at line 446 of file covboxes.h.

◆ leftBound()

template<class NumType >
NumType tCoverBoxes< NumType >::leftBound ( int  coord,
int  dir 
) const
inlineprivate

Computes the real left coordinate in the given direction of a box represented by integer coordinates.

Definition at line 304 of file covboxes.h.

◆ leftCoord()

template<class NumType >
tCoverBoxes< NumType >::CoordType tCoverBoxes< NumType >::leftCoord ( const NumType &  bound,
int  dir 
) const
inlineprivate

Computes the left coordinate in the given direction of the leftmost box to cover the given real coordinate.

Definition at line 329 of file covboxes.h.

References tCoverBoxes< NumType >::rightCoord().

Referenced by tCoverBoxes< NumType >::rightBound().

◆ operator=()

template<class NumType >
tCoverBoxes< NumType > & tCoverBoxes< NumType >::operator= ( const tCoverBoxes< NumType > &  )
inlineprivate

The assignment operator should not be used.

Definition at line 265 of file covboxes.h.

◆ rightBound()

template<class NumType >
NumType tCoverBoxes< NumType >::rightBound ( int  coord,
int  dir 
) const
inlineprivate

Computes the real right coordinate in the given direction of a box represented by integer coordinates.

Definition at line 315 of file covboxes.h.

References tCoverBoxes< NumType >::leftCoord().

◆ rightCoord()

template<class NumType >
tCoverBoxes< NumType >::CoordType tCoverBoxes< NumType >::rightCoord ( const NumType &  bound,
int  dir 
) const
inlineprivate

Computes the right coordinate in the given direction of the rightmost box to cover the given real coordinate.

Definition at line 375 of file covboxes.h.

Referenced by tCoverBoxes< NumType >::leftCoord().

◆ size()

template<class NumType >
int tCoverBoxes< NumType >::size ( ) const
inline

Returns the number of boxes in the cover.

Definition at line 290 of file covboxes.h.

Member Data Documentation

◆ boxes

template<class NumType>
chomp::homology::hashedset<CubeType> tCoverBoxes< NumType >::boxes
private

The set of boxes in the cover.

Definition at line 158 of file covboxes.h.

◆ boxWidths

template<class NumType>
NumType* tCoverBoxes< NumType >::boxWidths
private

The widths of the covered rectangle in all the directions.

Definition at line 135 of file covboxes.h.

◆ buffer

template<class NumType>
CoordType* tCoverBoxes< NumType >::buffer
private

A temporary buffer for the coordinates of two cubes.

Definition at line 152 of file covboxes.h.

◆ leftCorner

template<class NumType>
NumType* tCoverBoxes< NumType >::leftCorner
private

The lower left corner of the covered rectangle.

Definition at line 132 of file covboxes.h.

◆ overlap

template<class NumType>
NumType* tCoverBoxes< NumType >::overlap
private

The minimal overlap width.

Definition at line 145 of file covboxes.h.

◆ partCounts

template<class NumType>
int* tCoverBoxes< NumType >::partCounts
private

The numbers of parts into which the box is subdivided in each direction.

Definition at line 142 of file covboxes.h.

◆ rightCorner

template<class NumType>
NumType* tCoverBoxes< NumType >::rightCorner
private

The upper right corner of the covered rectangle.

Definition at line 138 of file covboxes.h.

◆ spaceDim

template<class NumType>
int tCoverBoxes< NumType >::spaceDim
private

The dimension of the space.

Definition at line 129 of file covboxes.h.


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