31#ifndef _CMGRAPHS_COVERRECT_H_
32#define _CMGRAPHS_COVERRECT_H_
42#include "chomp/system/config.h"
43#include "chomp/system/textfile.h"
44#include "chomp/struct/autoarray.h"
48#include "capd/vectalg/lib.h"
49#include "capd/dynset/lib.h"
50#include "capd/dynsys/lib.h"
53#define CAPD_USER_NAMESPACE capd
54#define CAPD_DEFAULT_DIMENSION spaceDim
55#include "capd/fdcapdlib.h"
56#undef CAPD_USER_NAMESPACE
57#undef CAPD_DEFAULT_DIMENSION
89template <
class DoubleArray1,
class DoubleArray2,
90 class CoordType,
class CubSetType>
92 const DoubleArray1 &offset,
const DoubleArray2 &width,
93 const CoordType *intWidth,
int dim,
95 const CoordType *left,
const CoordType *right,
96 const CubSetType *codomain,
const CubSetType *
disjoint)
99 typedef typename CubSetType::value_type CubeType;
102 typedef capd::C0Rect2Set C0SetType;
103 typedef typename C0SetType::MatrixType MatrixType;
104 typedef typename C0SetType::VectorType VectorType;
111 chomp::homology::tRectangle<CoordType> r (left, right, dim);
112 const CoordType *coord;
124 using capd::matrixAlgorithms::gaussInverseMatrix;
125 MatrixType C_1 = gaussInverseMatrix (
127 rectSet. corrector. get_C ()
132 MatrixType B_1 = gaussInverseMatrix (
134 rectSet. corrector. get_B ()
141#ifdef PREDICTOR_CORRECTOR
142 rectSet. corrector. get_r0 () +
143 (C_1 * rectSet. corrector. get_B ()) *
144 rectSet. corrector. get_r ();
147 (C_1 * rectSet. get_B ()) * rectSet. get_r ();
150#ifdef PREDICTOR_CORRECTOR
151 rectSet. corrector. get_r () +
152 (B_1 * rectSet. corrector. get_C ()) *
153 rectSet. corrector. get_r0 ();
156 (B_1 * rectSet. get_C ()) * rectSet. get_r0 ();
161#ifdef PREDICTOR_CORRECTOR
162 rectSet. corrector. get_x ();
168 VectorType Z (dim,
false);
169 VectorType Z_x (x. dimension (),
false);
170 VectorType z1 (x. dimension (),
false);
171 VectorType z2 (x. dimension (),
false);
173 while ((coord = r. get ()) != 0)
176 CubeType q (coord, dim);
179 if (codomain && !codomain -> check (q))
188 for (
int i = 0; i < dim; ++ i)
191 Z [i] /= intWidth [i];
199 if (capd::vectalg::intersectionIsEmpty (z1, w1))
202 if(capd::vectalg::intersectionIsEmpty(z2, w2))
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)
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).
Data type for the rectangular (Lohner-type) set from CAPD.
capd::C0HORect2Set RectSetType
The type of the rectangular set to use.
#define PREDICTOR_CORRECTOR