00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #pragma once
00014
00015 #ifndef __BASEPATH__
00016 #define __BASEPATH__
00017
00018
00019 #include "dyadic_interval.h"
00020 #include <deque>
00021
00022
00024
00028 template <typename my_alg_type>
00029 class BasePath
00030 {
00031 protected:
00032 typedef typename my_alg_type::LIE LIE;
00033 typedef typename my_alg_type::MAPS MAPS;
00034 typedef typename my_alg_type::CBH CBH;
00035 typedef typename my_alg_type::SCA SCA;
00036 typedef typename my_alg_type::S S;
00037
00038 static const unsigned myDIM = my_alg_type::myDIM;
00039
00040 public:
00041 BasePath(void){};
00042 virtual ~BasePath(void){};
00043
00045
00047 LIE virtual DescribePath(const dyadic_interval &increment, const int accuracy) const = 0
00048 {
00049 return LIE();
00050 };
00051
00053 LIE DescribePath(const dyadic_interval &increment) const
00054 {
00055 return DescribePath(increment, increment.n);
00056 };
00057
00059 LIE virtual DescribePath(double inf, double sup, int tolerance) const
00060
00061
00062
00063 {
00064 std::deque<dyadic_interval> stack = dyadic_interval::to_dyadic_intervals(inf, sup, tolerance);
00065 std::vector <LIE > incs;
00066 std::vector <LIE* > pincs;
00067 for (std::deque<dyadic_interval>::iterator it = stack.begin(); it != stack.end();++it)
00068 {
00069 LIE temp = DescribePath(*it, tolerance);
00070 incs.push_back(temp);
00071 pincs.push_back(& incs.back());
00072 }
00073 return LibAlgCBH.full(pincs);
00074 };
00075
00076 private:
00077
00078
00079
00080 CBH LibAlgCBH;
00081
00082 };
00083
00084 #endif // __BASEPATH__
00085