The Conley-Morse Graphs Software
maptight.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2///
3/// @file maptight.h
4///
5/// An abstract tight map type that computes the image of a box
6/// in terms of a rectangular set from the CAPD package, as opposed to
7/// producing a rectangular bounding box (product of intervals).
8/// This file contains the definition of an abstract class
9/// of a multi-parameter map for the program "cmgraphs.cpp",
10/// derived from the class "MapType".
11/// A class which defines a particular map can be derived
12/// from the class "MapTight" defined in this file,
13/// or at least should have the same interface.
14///
15/// @author Pawel Pilarczyk
16///
17/////////////////////////////////////////////////////////////////////////////
18
19// Copyright (C) 1997-2014 by Pawel Pilarczyk.
20//
21// This file is part of my research software package. This is free software:
22// you can redistribute it and/or modify it under the terms of the GNU
23// General Public License as published by the Free Software Foundation,
24// either version 3 of the License, or (at your option) any later version.
25//
26// This software is distributed in the hope that it will be useful,
27// but WITHOUT ANY WARRANTY; without even the implied warranty of
28// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29// GNU General Public License for more details.
30//
31// You should have received a copy of the GNU General Public License
32// along with this software; see the file "license.txt". If not,
33// please, see <https://www.gnu.org/licenses/>.
34
35// Started on February 9, 2008. Last revision: July 19, 2012.
36
37
38#ifndef _CMGRAPHS_MAPTIGHT_H_
39#define _CMGRAPHS_MAPTIGHT_H_
40
41
42// include local header files
43#include "typeintv.h"
44#include "typespace.h"
45
46
47// --------------------------------------------------
48// ------------- the abstract map class -------------
49// --------------------------------------------------
50
51/// This is an abstract class which defines the interface to other classes
52/// that describe maps for the use for the program "cmgraphs.cpp".
53class MapTight: public MapType
54{
55public:
56 /// The default constructor of an object which describes a map.
57 MapTight ();
58
59 /// The destructor of an object which describe a map.
60 ~MapTight ();
61
62 /// Computes an interval bounding box for the image of a given box.
63 /// This function should not be used but is provided because of
64 /// the interface requirements. A function that produces
65 /// a rectangular set should be used instead.
66 void compute (const double *xleft, const double *xright,
67 double *yleft, double *yright, int dim,
68 const spcCoord *coord, int subdiv) const;
69
70 /// Computes a rectangular set that is an outer enclosure
71 /// of the image of the given box.
72 /// Whenever this information is relevant, the integer coordinates
73 /// of the box are provided, as well as the subdivision level
74 /// of the full phase space box; otherwise the pointer to the
75 /// coordinates is set to 0, and the subdivision level is undefined.
76 virtual void compute (const IntervalVectorType &x,
77 RectSetType &y, int dim,
78 const spcCoord *coord, int subdiv) const = 0;
79
80private:
81 /// The copy constructor should not be used.
82 MapTight (const MapTight &);
83
84 /// The assignment operator should not be used.
86
87}; /* class MapTight */
88
89// --------------------------------------------------
90
92{
93 return;
94} /* MapTight::MapTight */
95
97{
98 return;
99} /* MapTight::~MapTight */
100
102{
103 return;
104} /* MapTight::MapTight */
105
107{
108 return *this;
109} /* MapTight::operator = */
110
111inline void MapTight::compute (const double *xleft, const double *xright,
112 double *yleft, double *yright, int dim,
113 const spcCoord *coord, int subdiv) const
114{
115 // prepare an interval vector for the box from the domain
116 IntervalVectorType x (dim);
117 for (int i = 0; i < dim; ++ i)
118 x [i] = IntervalType (xleft [i], xright [i]);
119
120 // compute the rectangular set that covers the image of this box
121 RectSetType y (x, x); // dummy rect2set
122 compute (x, y, dim, coord, subdiv);
123
124 // enclose the rectangular set in an interval vector
125 IntervalVectorType result (y);
126
127 // save the coordinates of the result
128 for (int i = 0; i < dim; ++ i)
129 {
130 yleft [i] = result [i]. leftBound ();
131 yright [i] = result [i]. rightBound ();
132 }
133
134 // reset the rounding direction setting of the processor
135 resetRounding ();
136
137 return;
138} /* MapTight::compute */
139
140
141#endif // _CMGRAPHS_MAPTIGHT_H_
142
This is an abstract class which defines the interface to other classes that describe maps for the use...
Definition: maptight.h:54
MapTight & operator=(const MapTight &)
The assignment operator should not be used.
Definition: maptight.h:106
void compute(const double *xleft, const double *xright, double *yleft, double *yright, int dim, const spcCoord *coord, int subdiv) const
Computes an interval bounding box for the image of a given box.
Definition: maptight.h:111
virtual void compute(const IntervalVectorType &x, RectSetType &y, int dim, const spcCoord *coord, int subdiv) const =0
Computes a rectangular set that is an outer enclosure of the image of the given box.
~MapTight()
The destructor of an object which describe a map.
Definition: maptight.h:96
MapTight()
The default constructor of an object which describes a map.
Definition: maptight.h:91
This is an abstract class which defines the interface to other classes that describe maps for the use...
Definition: maptype.h:59
Data types for interval arithmetic.
void resetRounding()
This function resets rounding switches of the processor and sets rounding to the nearest.
Definition: typeintv.h:65
capd::DInterval IntervalType
The type of an interval (from the CAPD library 2.9/3.0 beta).
Definition: typeintv.h:49
capd::C0HORect2Set RectSetType
The type of the rectangular set to use.
Definition: typerect.h:57
capd::IVector IntervalVectorType
The interval vector type for creating the rectangular set by means of its center + box.
Definition: typerect.h:63
Customizable data types for the Conley-Morse graphs computation program.
int spcCoord
The type of coordinates of cubes in the phase space.
Definition: typespace.h:50