• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

RDE_lib2/BasePath.h

00001 /* *************************************************************
00002 
00003 Copyright 2010 Terry Lyons, Stephen Buckley, Djalil Chafai, 
00004 Greg Gyurkó and Arend Janssen. 
00005 
00006 Distributed under the terms of the GNU General Public License, 
00007 Version 3. (See accompanying file License.txt)
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         /* Describes a Brownian Path across a real interval */ 
00061         /* resolving the interval and the path used in the */ 
00062         /* computation to a level of time 2^(-_iAccuracy) */
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         // an object for manipulating LIE elements
00078         // LIE LibAlgCBH.full(std::vector<LIE>) 
00079         // computes the campbell hausdorff product of the vector
00080         CBH LibAlgCBH;
00081 
00082 };
00083 
00084 #endif // __BASEPATH__
00085 

Generated on Fri Jan 14 2011 17:50:33 for Rough Differential Equation Solver by  doxygen 1.7.1