rallNd.h

Go to the documentation of this file.
00001 #ifndef RALLND_H
00002 #define RALLND_H
00003 
00004 #include "rall1d.h"
00005 #include "rall1d_io.h"
00006 #include "rall2d.h"
00007 #include "rall2d_io.h"
00014 /*
00015 template <int N>
00016 class RallNd :
00017         public Rall1d< RallNd<N-1>, RallNd<N-1>, double >
00018 {
00019 public:
00020         RallNd() {}
00021         RallNd(const Rall1d< RallNd<N-1>, RallNd<N-1>,double>& arg) : 
00022                 Rall1d< RallNd<N-1>, RallNd<N-1>,double>(arg) {}
00023         RallNd(double value,double d[]) {
00024                 this->t    = RallNd<N-1>(value,d);
00025                 this->grad = RallNd<N-1>(d[0],&d[1]);
00026         }
00027 };
00028 
00029 template <>
00030 class RallNd<1> : public Rall1d<double>  {
00031 public:
00032         RallNd() {}
00033         RallNd(const Rall1d<double>& arg) :
00034                 Rall1d<double,double,double>(arg) {}
00035         RallNd(double value,double d[]) {
00036                 t    = value;
00037                 grad = d[0];
00038         }
00039 };
00040 */
00060 // N>2:
00061 template <int N>
00062 class RallNd :
00063         public Rall2d< RallNd<N-2>, RallNd<N-2>, double >
00064 {
00065 public:
00066         RallNd() {}
00067         RallNd(const Rall2d< RallNd<N-2>, RallNd<N-2>,double>& arg) : 
00068                 Rall2d< RallNd<N-2>, RallNd<N-2>,double>(arg) {}
00069         RallNd(double value,double d[]) {
00070                 this->t    = RallNd<N-2>(value,d);    // 0 1 2
00071                 this->d    = RallNd<N-2>(d[0],&d[1]); // 1 2 3 iseigenlijk niet nodig
00072                 this->dd   = RallNd<N-2>(d[1],&d[2]); // 2 3 4
00073         }
00074 };
00075 
00076 template <>
00077 class RallNd<2> : public Rall2d<double>  {
00078 public:
00079         RallNd() {} /* (dwz. met evenveel numerieke operaties als een */
00080         RallNd(const Rall2d<double>& arg) :
00081                 Rall2d<double>(arg) {}
00082         RallNd(double value,double d[]) {
00083                 t    = value;
00084                 d = d[0];
00085                 dd= d[1];
00086         }
00087 };
00088 
00089 template <>
00090 class RallNd<1> : public Rall1d<double>  {
00091 public:
00092         RallNd() {}
00093         RallNd(const Rall1d<double>& arg) :
00094                 Rall1d<double>(arg) {}
00095         RallNd(double value,double d[]) {
00096                 t    = value;
00097                 grad = d[0];
00098         }
00099 };
00100 
00101 #endif
00102 

Generated on Wed Nov 23 19:00:35 2011 for FreeCAD by  doxygen 1.6.1