95 double* chebimp_ini(
const int n )
101 static double* table_x[NMAX] ;
102 static int nwork = 0 ;
103 static int tbn[NMAX] ;
111 for ( i=0 ; i < nwork ; i++ ) {
112 if ( tbn[i] == n ) indice = i ;
117 if ( nwork >= NMAX ) {
118 cout <<
"chebimp_ini: nwork > NMAX : " 119 << nwork <<
" <-> " << NMAX << endl ;
122 indice = nwork ; nwork++ ; tbn[indice] = n ;
124 table_x[indice] =
new double[n] ;
126 double xx = M_PI / double(2*(n-1));
127 for ( i = 0; i < n ; i++ ) {
128 table_x[indice][i] =
sin( xx * i );
135 return table_x[indice] ;
Cmp sin(const Cmp &)
Sine.