64 #include "type_parite.h" 88 void _multx_1d_pas_prevu(
int nr,
double* tb,
double *result) {
89 cout <<
"multx pas prevu..." << endl ;
90 cout <<
"Valeurs : " << tb <<
" " << result << endl ;
91 cout <<
" nr : " << nr << endl ;
101 void _multx_1d_r_cheb (
int nr,
double* tb,
double* res) {
104 res[1] = (2*tb[0]+tb[2])/2. ;
105 res[nr-1] = tb[nr-2]/2. ;
107 for (
int i=2 ; i<nr-1 ; i++)
108 res[i] = (tb[i-1]+tb[i+1])/2. ;
117 void _multx_1d_r_leg (
int nr,
double* tb,
double* res) {
121 res[1] = tb[0]+0.4*tb[2] ;
122 res[nr-1] = double(nr-1)*tb[nr-2]/double(2*nr-3) ;
124 for (
int i=2 ; i<nr-1 ; i++)
125 res[i] =
double(i)*tb[i-1]/double(2*i-1)
126 + double(i+1)*tb[i+1]/double(2*i+3) ;
136 void multx_1d(
int nr,
double **tb,
int base_r)
140 static void (*multx_1d[
MAX_BASE])(int,
double *,
double *) ;
147 multx_1d[i] = _multx_1d_pas_prevu ;
155 double *result =
new double[nr] ;
156 multx_1d[base_r](nr, *tb, result) ;
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define MAX_BASE
Nombre max. de bases differentes.
#define R_LEG
base de Legendre ordinaire (fin)
#define R_CHEB
base de Chebychev ordinaire (fin)