Files Classes Functions Hierarchy
00001 #ifndef POWERSERIESWD_H 00002 #define POWERSERIESWD_H 00003 00004 #include <cassert> 00005 using namespace std; 00006 00007 #include <powerseries1D.h> 00008 00036 template< typename T > 00037 class powerseriesWD 00038 { 00039 public: 00040 00042 T * const mat; 00043 00045 uintc W; 00047 uintc N; 00048 00050 powerseries1D<T> currentP; 00051 00053 void currentSet(uintc i); 00054 00056 powerseriesWD( T * const mat_, uintc W_, uintc N_ ); 00057 00059 void operator()(T & val, T const t) const 00060 { currentP(val,t); } 00061 00063 T const operator()(T const t) const 00064 { return currentP(t); } 00065 00066 00067 }; 00068 00069 template< typename T > 00070 void powerseriesWD<T>::currentSet(uintc i) 00071 { 00072 assert( (i==0) || (i<N) ); 00073 currentP.construct(mat+i*N,N); 00074 } 00075 00076 00077 00078 template< typename T > 00079 powerseriesWD<T>::powerseriesWD 00080 ( 00081 T * const mat_, 00082 uintc W_, 00083 uintc N_ 00084 ) 00085 : mat(mat_), W(W_), N(N_) 00086 { 00087 currentP.construct(mat_,N); 00088 } 00089 00090 00091 #endif 00092 00093
1.5.8