23char comb_lin_cpt_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/PDE/comb_lin_cpt.C,v 1.4 2014/10/13 08:53:28 j_novak Exp $" ;
67Matrice _cl_cpt_pas_prevu (
const Matrice &source,
int) {
68 cout <<
"Combinaison lineaire pas prevu..." << endl ;
69 cout <<
"Source : " << source << endl ;
80Matrice _cl_cpt_r_chebp (
const Matrice &source,
int) {
83 assert (n == source.get_dim(1)) ;
85 Matrice barre(source) ;
87 for (
int i=0 ; i<n-2 ; i++) {
88 for (
int j=0 ; j<n ; j++)
89 barre.set(i, j) = ((1+dirac)*source(i, j)-source(i+2, j))/(i+1) ;
94 for (
int i=0 ; i<n-4 ; i++)
95 for (
int j=0 ; j<n ; j++)
96 res.set(i, j) = barre(i, j)-barre(i+2, j) ;
108Matrice _cl_cpt_r_chebi (
const Matrice &source,
int l) {
110 assert (n == source.get_dim(1)) ;
112 Matrice barre(source) ;
113 for (
int i=0 ; i<n-2 ; i++)
114 for (
int j=0 ; j<n ; j++)
115 barre.set(i, j) = (source(i, j)-source(i+1, j))/(i+1) ;
118 for (
int i=0 ; i<n-4 ; i++)
119 for (
int j=0 ; j<n ; j++)
120 res.set(i, j) = barre(i, j)-barre(i+2, j) ;
136Matrice combinaison_cpt (
const Matrice &source,
int l,
int base_r) {
139 static Matrice (*combinaison_cpt[
MAX_BASE])
140 (
const Matrice &, int) ;
147 combinaison_cpt[i] = _cl_cpt_pas_prevu ;
154 Matrice res(combinaison_cpt[base_r](source, l)) ;
164Tbl _cl_cpt_pas_prevu(
const Tbl& tb) {
165 cout <<
"combinaison_nul_pas_prevu " << endl ;
166 cout <<
"tb : " << tb << endl ;
175Tbl _cl_cpt_r_chebp(
const Tbl& tb) {
177 assert (tb.get_etat() != ETATNONDEF) ;
178 int n=tb.get_dim(0) ;
182 for (
int i=0 ; i<n-2 ; i++) {
183 barre.set(i) = ((1+dirac)*tb(i)-tb(i+2))/(i+1) ;
184 if (i==0) dirac = 0 ;
188 for (
int i=0 ; i<n-4 ; i++)
189 res.set(i) = barre(i)-barre(i+2) ;
199Tbl _cl_cpt_r_chebi(
const Tbl& tb) {
201 assert (tb.get_etat() != ETATNONDEF) ;
202 int n=tb.get_dim(0) ;
205 for (
int i=0 ; i<n-2 ; i++)
206 barre.set(i) = (tb(i)-tb(i+1))/(i+1) ;
209 for (
int i=0 ; i<n-4 ; i++)
210 res.set(i) = barre(i)-barre(i+2) ;
220Tbl combinaison_cpt (
const Tbl &source,
int base_r) {
223 static Tbl (*combinaison_cpt[
MAX_BASE])(
const Tbl&) ;
230 combinaison_cpt[i] = _cl_cpt_pas_prevu ;
237 Tbl res(combinaison_cpt[base_r](source)) ;
int get_dim(int i) const
Returns the dimension of the matrix.
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEBI
base de Cheb. impaire (rare) seulement
#define TRA_R
Translation en R, used for a bitwise shift (in hex)
#define R_CHEBP
base de Cheb. paire (rare) seulement