ARKADAŞLAR ELİNDE Chebyshev POŞLİNOMUNUNN KATSASAYILARINI HESAPLATACAK PROGRAM OLAN VARSA ACAYİP MAKBULE GEÇER

Tam olarak istediğin nedir...? 00001 / / 00003 / 00004 @file MathUtils/Chebyshev. c 00005 @brief GIRAFFE BLDRS MathUtils Chebyshev functions 00006 00007 $Id: Chebyshev. c, v 1.12 2001/09/28 11:19:57 simond Exp $ 00008 $Author: simond $ 00009 $Date: 2001/09/28 11:19:57 $ 00010 $Revision: 1.12 $ 00011 00012 @par Public Functions: 00013 - computeChebyshevBase1D computes chebyshev base 00014 - computeChebyshevBase2D computes bi-variate chebyshev base 00015 / 00018 / OGL - GIRAFFE 00019 00020 who when what 00021 00022 gsimond 20010515 created from Chebyshev_wrap. c Python wrapper 00023 gsimond 20010917 move computeImageCoordinates to preprocessing. c 00024 00025 / 00026 00027 #include <matrix. h> 00028 00029 #include "MathUtils/Chebyshev. h" 00030 00031 #ifdef MEMDEBUG 00032 # include "MemDebug. h" 00033 #else 00034 # ifdef DMALLOC 00035 # include "dmalloc. h" 00036 # else 00037 # include <malloc. h> 00038 # endif 00039 #endif 00040 00041 / / 00042 00043 Matrix computeChebyshevBase1D 00065 { 00066 register double xn, dsize2, d2size; 00067 register int i, j; 00068 Matrix mT = NULL; 00069 00070 dsize2 = size / 2.0; 00071 d2size = 2.0 / size; 00072 if ((mT = matrix_new NULL) 00073 return NULL; 00074 00075 for (j = 0; j < mT->nc; j++) { 00076 / normalize array between 00077 x = (array - start - size/2.0) 2.0/size 00078 / 00079 xn = (mX->m - start - dsize2) d2size; 00080 00081 / ones for first column: T = 1.0 / 00082 mT->m = 1.0; 00083 00084 if (order < 2) continue; 00085 00086 / X for second column: T = x / 00087 mT->m = xn; 00088 00089 for (i = 2 ; i < order; i++) 00096 } 00097 00098 return mT; 00099 } / end of computeChebyshevBase1D / 00100 00101 / / 00102 00103 Matrix computeChebyshevBase2D(double xstart, double ystart, 00104 double xsize, double ysize, 00105 int xorder, int yorder, 00106 Matrix mX, Matrix mY) 00132 { 00133 register double xn, yn, dxsize2, dysize2, d2xsize, d2ysize; 00134 register double bx0, bx1, bx2, by0, by1, by2; 00135 register int i, j, k, l; 00136 Matrix mT = NULL; 00137 00138 dxsize2 = xsize / 2.0; 00139 d2xsize = 2.0 / xsize; 00140 dysize2 = ysize / 2.0; 00141 d2ysize = 2.0 / ysize; 00142 if ((mT = matrix_new NULL) 00143 return NULL; 00144 00145 #ifdef DEBUG 00146 fprintf(stderr,"computeChebyshevBase2D called\n", 00147 xorder, yorder, xsize, ysize, xstart, ystart); 00148 fflush ; 00149 #endif / DEBUG / 00150 00151 for (j = 0; j < mT->nc; j++) { 00152 / normalize array between 00153 x = (array - start - size/2.0) 2.0/size 00154 / 00155 xn = (mX->m - xstart - dxsize2) d2xsize; 00156 yn = (mY->m - ystart - dysize2) d2ysize; 00157 bx0 = 1.0; 00158 bx1 = xn; 00159 00160 for (l = 0, i = 0; i < xorder; i++) { 00161 if (i < 2) 00164 else 00167 by0 = 1.0; 00168 by1 = yn; 00169 for (k = 0; k < yorder; k++) { 00170 if (k < 2) 00173 else 00176 mT->m = bx2 by2; 00177 by0 = by1; 00178 by1 = by2; 00179 } 00180 bx0 = bx1; 00181 bx1 = bx2; 00182 } 00183 } 00184 00185 #ifdef DEBUG 00186 fprintf(stderr,"mT =computeChebyshevBase2D exited\n", 00187 mT->nr, mT->nc); 00188 fflush ; 00189 #endif / DEBUG / 00190 00191 return mT; 00192 00193 } / end of computeChebyshevBase2D / 00194 00195 00196 / o0o / Evil

hocam istediğin programı tam anlayamadım ki yardımcı olim Chebyshev katsayıları ile ilgili bişey istemişin ama program algoritmasını söle bi bana.. biraz açık yazarsan yardımcı olmaya çalışıcam Evil