matrixutil.hpp

Go to the documentation of this file.
00001 #ifndef MATRIXUTIL_HPP
00002 #define MATRIXUTIL_HPP
00003 
00004 
00005 template <typename T>
00006 void reserve_2D( T ** &arr, int xsize, int ysize) {
00007   // zusammenhängendes 2D-Array reservieren
00008   arr=new T* [ysize];
00009   arr[0]=new T [xsize*ysize];
00010   for (int y=1; y<ysize; y++) 
00011     arr[y]=arr[0]+y*xsize;
00012 }
00013 
00014 template <typename T>
00015 void delete_2D( T ** &arr) {
00016   delete[] arr[0];
00017   delete[] arr;
00018 }  
00019 
00020 bool QR (int zeilen, int spalten, double **A, double *d, double *b, const double epsilon);
00021 void rdsolve (int spalten, double** R, double *d, double *c, double *x);
00022 void Invert_RtR(double **R, double **I, int n);
00023 void compute_errors(int num_param, int num_data, double **R, double *d, double *b, double *errors);
00024 
00025 inline double signum(double a) { 
00026  if (a>0) return 1.0;
00027  else return -1.0; 
00028 }
00029 
00030 
00031 
00032 #endif

Generated on Fri Jul 24 12:49:17 2009 for Xgrayimg Library by  doxygen 1.5.5