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
00047 #if !defined(__DF32FUN__)
00048 # define __DF32FUN__
00049 class df1b2variable;
00050
00055 class df3_two_variable
00056 {
00057 double v[10];
00058
00059 public:
00060 static df1b2variable* ind_var[];
00061 static int num_ind_var;
00062
00063 df3_two_variable();
00064 df3_two_variable(const df3_two_variable &);
00065
00066 double *get_u(void) const
00067 {
00068 return (double*)(&(v[0]));
00069 }
00070 double *get_u_x(void) const
00071 {
00072 return (double*)(&(v[1]));
00073 }
00074 double *get_u_y(void) const
00075 {
00076 return (double*)(&(v[2]));
00077 }
00078 double *get_u_xx(void) const
00079 {
00080 return (double*)(&(v[3]));
00081 }
00082 double *get_u_xy(void) const
00083 {
00084 return (double*)(&(v[4]));
00085 }
00086 double *get_u_yy(void) const
00087 {
00088 return (double*)(&(v[5]));
00089 }
00090 double *get_u_xxx(void) const
00091 {
00092 return (double*)(&(v[6]));
00093 }
00094 double *get_u_xxy(void) const
00095 {
00096 return (double*)(&(v[7]));
00097 }
00098 double *get_u_xyy(void) const
00099 {
00100 return (double*)(&(v[8]));
00101 }
00102 double *get_u_yyy(void) const
00103 {
00104 return (double*)(&(v[9]));
00105 }
00106 df3_two_variable& operator=(const df3_two_variable & v);
00107 df3_two_variable& operator=(double v);
00108 df3_two_variable& operator+=(const df3_two_variable & v);
00109 df3_two_variable& operator*=(const df3_two_variable & v);
00110 df3_two_variable& operator*=(double v);
00111 df3_two_variable& operator+=(double v);
00112 df3_two_variable& operator-=(double v);
00113 df3_two_variable& operator-=(const df3_two_variable & v);
00114 df3_two_variable& operator/=(const df3_two_variable & v);
00115 };
00116
00121 inline double value(const df3_two_variable & x)
00122 {
00123 return double (*x.get_u());
00124 }
00125
00130 class init_df3_two_variable:public df3_two_variable
00131 {
00132 public:
00133 init_df3_two_variable(const df1b2variable &);
00134 init_df3_two_variable(double);
00135 };
00136
00141 class df3_two_vector
00142 {
00143 int index_min;
00144 int index_max;
00145 vector_shapex *shape;
00146 df3_two_variable *v;
00147 public:
00148 int indexmin(void) const
00149 {
00150 return int (index_min);
00151 }
00152 int indexmax(void) const
00153 {
00154 return int (index_max);
00155 }
00156 df3_two_vector(int min, int max);
00157 df3_two_vector(void);
00158 void allocate(void);
00159 void allocate(int min, int max);
00160 df3_two_variable & operator () (int i) const
00161 {
00162 return (df3_two_variable &) (*(v + i));
00163 }
00164 df3_two_variable & operator [] (int i) const
00165 {
00166 return (df3_two_variable &) (*(v + i));
00167 }
00168 void initialize(void);
00169 void deallocate(void);
00170 ~df3_two_vector();
00171 df3_two_vector(const df3_two_vector & m2);
00172 };
00173
00174
00175
00176 dvector value(const df3_two_vector & v);
00177
00178 dvector first_derivatives(const df3_two_vector & v);
00179
00180 dvector second_derivatives(const df3_two_vector & v);
00181
00182 dvector third_derivatives(const df3_two_vector & v);
00183
00188 class df3_two_matrix
00189 {
00190 int index_min;
00191 int index_max;
00192 mat_shapex *shape;
00193 df3_two_vector *v;
00194 public:
00195 int indexmin(void) const
00196 {
00197 return int (index_min);
00198 }
00199 int indexmax(void) const
00200 {
00201 return int (index_max);
00202 }
00203 df3_two_matrix(int rmin, int rmax, int cmin, int cmax);
00204 df3_two_vector & operator () (int i) const
00205 {
00206 return (df3_two_vector &) * (v + i);
00207 }
00208 df3_two_vector & operator [] (int i) const
00209 {
00210 return (df3_two_vector &) * (v + i);
00211 }
00212 df3_two_variable & operator () (int i, int j) const
00213 {
00214 return (df3_two_variable &) (*(v + i)) (j);
00215 }
00216 void initialize(void);
00217
00218
00219 void deallocate(void);
00220 ~df3_two_matrix();
00221 df3_two_matrix(const df3_two_matrix & m2);
00222 };
00223
00224 dmatrix value(const df3_two_matrix & v);
00225
00226 dmatrix first_derivatives(const df3_two_matrix & v);
00227 dmatrix second_derivatives(const df3_two_matrix & v);
00228 dmatrix third_derivatives(const df3_two_matrix & v);
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250 df3_two_variable sin(const df3_two_variable & x);
00251 df3_two_variable fabs(const df3_two_variable & x);
00252 df3_two_variable sqrt(const df3_two_variable & x);
00253 df3_two_variable atan(const df3_two_variable & x);
00254 df3_two_variable cos(const df3_two_variable & x);
00255 df3_two_variable tan(const df3_two_variable & x);
00256 df3_two_variable log(const df3_two_variable & x);
00257 df3_two_variable square(const df3_two_variable & x);
00258 df3_two_variable cube(const df3_two_variable & x);
00259 df3_two_variable pow(const df3_two_variable & x,
00260 const df3_two_variable & y);
00261 df3_two_variable sqrt(const df3_two_variable & x);
00262 df3_two_variable exp(const df3_two_variable & x);
00263 df3_two_variable inv(const df3_two_variable & x);
00264 df3_two_variable operator *(const df3_two_variable & x,
00265 const df3_two_variable & y);
00266 df3_two_variable operator *(double x, const df3_two_variable & y);
00267 df3_two_variable operator *(const df3_two_variable & x, double y);
00268 df3_two_variable operator /(const df3_two_variable & x,
00269 const df3_two_variable & y);
00270 df3_two_variable operator /(const double x, const df3_two_variable & y);
00271
00272 df3_two_variable operator /(const df3_two_variable & x, const double y);
00273
00274 df3_two_variable operator +(const double x, const df3_two_variable & y);
00275
00276 df3_two_variable operator +(const df3_two_variable & x, const double y);
00277
00278 df3_two_variable operator +(const df3_two_variable & x,
00279 const df3_two_variable & y);
00280 df3_two_variable operator -(double x, const df3_two_variable & y);
00281 df3_two_variable operator -(const df3_two_variable & x, double y);
00282 df3_two_variable operator -(const df3_two_variable & x,
00283 const df3_two_variable & y);
00284 int operator <(const df3_two_variable & x, double n);
00285 int operator >(const df3_two_variable & x, double n);
00286 int operator >=(const df3_two_variable & x, double n);
00287 int operator ==(const df3_two_variable & x, const df3_two_variable & n);
00288 int operator ==(const df3_two_variable & x, double n);
00289 int operator ==(double x, const df3_two_variable & n);
00290 int operator <(const df3_two_variable & x, const df3_two_variable & n);
00291 int operator >(const df3_two_variable & x, const df3_two_variable & n);
00292
00293 df3_two_variable operator -(const df3_two_variable & v);
00294 df3_two_matrix choleski_decomp(const df3_two_matrix & MM);
00295
00296 df3_two_variable cumd_gamma(const df3_two_variable & x,
00297 const df3_two_variable & a);
00298
00299 df3_two_variable gammln(const df3_two_variable & xx);
00300 #endif