32#ifndef _CMGRAPHS_TWOTORUS_H_
33#define _CMGRAPHS_TWOTORUS_H_
44#include "chomp/system/textfile.h"
63 void compute (
const double *xleft,
const double *xright,
64 double *yleft,
double *yright,
int dim,
65 const spcCoord *coord,
int subdiv)
const;
83 using chomp::homology::sbug;
85 y = 16 * power (y - x / 2 - 1.0 / 4, 3) + 1.0 / 4 + x / 2;
91 double *yleft,
double *yright,
int dim,
const spcCoord *,
int)
const
93 using chomp::homology::sbug;
97 throw "Mapping for two circles on a torus: dim = 2 only!";
105 int whichMap =
static_cast<int> (std::floor (
getLeftParam (0)));
111 y = 4 * power (y - 1.0 / 2, 3) + 1.0 / 2;
112 yleft [0] = xleft [0];
113 yright [0] = xright [0];
114 yleft [1] = y. leftBound ();
115 yright [1] = y. rightBound ();
124 bool inside (((x / 2). leftBound () <= y. rightBound ()) &&
125 (y. leftBound () <= (x / 2 + 1.0 / 2). rightBound ()));
126 bool outside (((x / 2). rightBound () > y. leftBound ()) ||
127 (y. rightBound () > (x / 2 + 1.0 / 2). leftBound ()));
146 if (yHalf. leftBound () >= 1.0)
150 if (yHalf. rightBound () <= 1.0)
163 yHalf = intervalHull (y1, y2);
170 if (yOutD. leftBound () >= 1.0)
187 x = intervalHull (xInD, xOutD);
188 y = intervalHull (yInD, yOutD);
192 yleft [0] = x. leftBound ();
193 yright [0] = x. rightBound ();
194 yleft [1] = y. leftBound ();
195 yright [1] = y. rightBound ();
This class defines a test mapping by a formula from Jacek Szybowski.
MapTwoTorus()
The default constructor.
void compute(const double *xleft, const double *xright, double *yleft, double *yright, int dim, const spcCoord *coord, int subdiv) const
Computes the image of a box whose left and right coordinates are given.
void computeMap0(IntervalType &x, IntervalType &y) const
Computes the core map. Replaces 'x' and 'y' with their images.
This is an abstract class which defines the interface to other classes that describe maps for the use...
const double & getLeftParam(int n) const
Returns the left value of the given parameter.
Data types for interval arithmetic.
void resetRounding()
This function resets rounding switches of the processor and sets rounding to the nearest.
bool testIntervals(bool throwException=false)
Testing interval arithmetic.
capd::DInterval IntervalType
The type of an interval (from the CAPD library 2.9/3.0 beta).
int spcCoord
The type of coordinates of cubes in the phase space.