Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00045 #if !defined(__DF33FUN__)
00046 # define __DF33FUN__
00047 class df1b2variable;
00048
00053 class df3_three_variable
00054 {
00055 double v[20];
00056 public:
00057 static df1b2variable* ind_var[];
00058 static int num_ind_var;
00059 static int num_local_ind_var;
00060
00061 df3_three_variable();
00062 df3_three_variable(const df3_three_variable&);
00063
00064 double* get_u() const { return (double*)(&(v[0])); }
00065 double* get_u_x() const { return (double*)(&(v[1])); }
00066 double* get_u_y() const { return (double*)(&(v[2])); }
00067 double* get_u_z() const { return (double*)(&(v[3])); }
00068 double* get_u_xx() const { return (double*)(&(v[4])); }
00069 double* get_u_xy() const { return (double*)(&(v[5])); }
00070 double* get_u_xz() const { return (double*)(&(v[6])); }
00071 double* get_u_yy() const { return (double*)(&(v[7])); }
00072 double* get_u_yz() const { return (double*)(&(v[8])); }
00073 double* get_u_zz() const { return (double*)(&(v[9])); }
00074 double* get_u_xxx() const { return (double*)(&(v[10])); }
00075 double* get_u_xxy() const { return (double*)(&(v[11])); }
00076 double* get_u_xxz() const { return (double*)(&(v[12])); }
00077 double* get_u_xyy() const { return (double*)(&(v[13])); }
00078 double* get_u_xyz() const { return (double*)(&(v[14])); }
00079 double* get_u_xzz() const { return (double*)(&(v[15])); }
00080 double* get_u_yyy() const { return (double*)(&(v[16])); }
00081 double* get_u_yyz() const { return (double*)(&(v[17])); }
00082 double* get_u_yzz() const { return (double*)(&(v[18])); }
00083 double* get_u_zzz() const { return (double*)(&(v[19])); }
00084
00085 df3_three_variable& operator=(const df3_three_variable& v);
00086 df3_three_variable& operator=(double v);
00087 df3_three_variable& operator+=(const df3_three_variable& v);
00088 df3_three_variable& operator*=(const df3_three_variable& v);
00089 df3_three_variable& operator*=(double v);
00090 df3_three_variable& operator+=(double v);
00091 df3_three_variable& operator-=(const df3_three_variable& v);
00092 df3_three_variable& operator-=(double v);
00093 df3_three_variable& operator/=(const df3_three_variable& v);
00094
00095 void initialize();
00096 };
00097
00102 inline double value(const df3_three_variable& x)
00103 { return double(*x.get_u()); }
00104
00109 class init_df3_three_variable : public df3_three_variable
00110 {
00111 public:
00112 init_df3_three_variable(const df1b2variable& );
00113 init_df3_three_variable(double );
00114 ~init_df3_three_variable();
00115 };
00116
00121 class df3_three_vector
00122 {
00123 int index_min;
00124 int index_max;
00125 vector_shapex * shape;
00126 df3_three_variable * v;
00127 public:
00128 int indexmin(void) const { return int(index_min); }
00129 int indexmax(void) const { return int(index_max); }
00130 df3_three_vector(int min,int max);
00131 df3_three_vector(void);
00132 void allocate(void);
00133 void allocate(int min,int max);
00134 df3_three_variable& operator () (int i) const
00135 {
00136 return (df3_three_variable&) (*(v+i));
00137 }
00138 df3_three_variable& operator [] (int i) const
00139 {
00140 return (df3_three_variable&) (*(v+i));
00141 }
00142 void initialize(void);
00143 void deallocate(void);
00144 ~df3_three_vector();
00145 df3_three_vector(const df3_three_vector& m2);
00146 };
00147
00148
00149
00150 dvector value(const df3_three_vector& v);
00151
00152 dvector first_derivatives(const df3_three_vector& v);
00153
00154 dvector second_derivatives(const df3_three_vector& v);
00155
00156 dvector third_derivatives(const df3_three_vector& v);
00157
00162 class df3_three_matrix
00163 {
00164 int index_min;
00165 int index_max;
00166 mat_shapex * shape;
00167 df3_three_vector * v;
00168 public:
00169 int indexmin(void) const { return int(index_min); }
00170 int indexmax(void) const { return int(index_max); }
00171 df3_three_matrix(int rmin,int rmax,int cmin,int cmax);
00172 df3_three_vector& operator () (int i) const
00173 {
00174 return (df3_three_vector&) *(v+i);
00175 }
00176 df3_three_vector& operator [] (int i) const
00177 {
00178 return (df3_three_vector&) *(v+i);
00179 }
00180 df3_three_variable& operator () (int i,int j) const
00181 {
00182 return (df3_three_variable&) (*(v+i))(j);
00183 }
00184 void initialize(void);
00185
00186
00187 void deallocate(void);
00188 ~df3_three_matrix();
00189 df3_three_matrix(const df3_three_matrix& m2);
00190 };
00191
00192 dmatrix value(const df3_three_matrix& v);
00193
00194 dmatrix first_derivatives(const df3_three_matrix& v);
00195 dmatrix second_derivatives(const df3_three_matrix& v);
00196 dmatrix third_derivatives(const df3_three_matrix& v);
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218 df3_three_variable fabs(const df3_three_variable& x);
00219 df3_three_variable sin(const df3_three_variable& x);
00220 df3_three_variable sqrt(const df3_three_variable& x);
00221 df3_three_variable atan(const df3_three_variable& x);
00222 df3_three_variable cos(const df3_three_variable& x);
00223 df3_three_variable tan(const df3_three_variable& x);
00224 df3_three_variable log(const df3_three_variable& x);
00225 df3_three_variable square(const df3_three_variable& x);
00226 df3_three_variable cube(const df3_three_variable& x);
00227 df3_three_variable pow(const df3_three_variable& x,
00228 const df3_three_variable& y);
00229
00230 df3_three_variable sqrt(const df3_three_variable& x);
00231 df3_three_variable exp(const df3_three_variable& x);
00232 df3_three_variable inv(const df3_three_variable& x);
00233 df3_three_variable operator * (const df3_three_variable& x,
00234 const df3_three_variable& y);
00235 df3_three_variable operator * (double x,
00236 const df3_three_variable& y);
00237 df3_three_variable operator * (const df3_three_variable& x,
00238 double y);
00239 df3_three_variable operator / (const df3_three_variable& x,
00240 const df3_three_variable& y);
00241
00242 df3_three_variable operator / (const double x,const df3_three_variable& y);
00243
00244 df3_three_variable operator / (const df3_three_variable& x,
00245 const double y);
00246
00247 df3_three_variable operator + (const double x,
00248 const df3_three_variable& y);
00249
00250 df3_three_variable operator + (const df3_three_variable& x,
00251 const double y);
00252
00253 df3_three_variable operator + (const df3_three_variable& x,
00254 const df3_three_variable& y);
00255 df3_three_variable operator - (double x,const df3_three_variable& y);
00256 df3_three_variable operator - (const df3_three_variable& x,double y);
00257
00258 df3_three_variable operator - (const df3_three_variable& x,
00259 const df3_three_variable& y);
00260
00261 df3_three_variable operator - (const df3_three_variable& v);
00262 df3_three_matrix choleski_decomp(const df3_three_matrix& MM);
00263
00264 df3_three_variable cumd_gamma(const df3_three_variable& x,
00265 const df3_three_variable& a);
00266
00267 df3_three_variable gammln(const df3_three_variable& xx);
00268 #endif // __DF32FUN__