56 #include "type_parite.h" 65 void _xdsdx_1d_pas_prevu(
int nr,
double* tb,
double *xo) {
66 cout <<
"xdsdx pas prevu..." << endl ;
67 cout <<
"Nombre de points : " << nr << endl ;
68 cout <<
"Valeurs : " << tb <<
" " << xo <<endl ;
78 void _xdsdx_1d_r_cheb(
int nr,
double* tb,
double *xo) {
82 for (
int i=nr-1 ; i>= 0 ; i-=2) {
85 else somme += i*tb[i]+(i+2)*tb[i+2] ;
91 for (
int i=nr-2 ; i>=0 ; i-=2) {
95 somme += i*tb[i]+(i+2)*tb[i+2] ;
105 void _xdsdx_1d_r_chebp(
int nr,
double* tb,
double *xo) {
108 for (
int i=nr-1 ; i>=0 ; i--) {
110 somme += (2*i)*tb[i] ;
112 somme += (2*i)*tb[i]+(2*i+2)*tb[i+1] ;
123 void _xdsdx_1d_r_chebi(
int nr,
double* tb,
double *xo) {
126 for (
int i=nr-1 ; i>=0 ; i--) {
128 somme += (2*i+1)*tb[i] ;
130 somme += (2*i+1)*tb[i]+(2*i+3)*tb[i+1] ;
142 void xdsdx_1d(
int nr,
double** tb,
int base_r)
146 static void (*xdsdx_1d[
MAX_BASE])(int,
double*,
double *) ;
153 xdsdx_1d[i] = _xdsdx_1d_pas_prevu ;
161 double *result =
new double[nr] ;
163 xdsdx_1d[base_r](nr, *tb, result) ;
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define R_CHEBP
base de Cheb. paire (rare) seulement
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEB
base de Chebychev ordinaire (fin)