23char itbl_math_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Itbl/itbl_math.C,v 1.3 2014/10/13 08:53:01 j_novak Exp $" ;
82 assert(ti.
get_etat() != ETATNONDEF) ;
95 const int* xi = ti.
t ;
99 for (
int i=0 ; i<taille ; i++) {
100 xo[i] =
abs( xi[i] ) ;
113 assert(ti.
get_etat() != ETATNONDEF) ;
123 const int* x = ti.
t ;
126 if ( x[i] > resu ) resu = x[i] ;
139 assert(ti.
get_etat() != ETATNONDEF) ;
149 const int* x = ti.
t ;
152 if ( x[i] < resu ) resu = x[i] ;
165 assert(ti.
get_etat() != ETATNONDEF) ;
172 const int* x = ti.
t ;
174 resu +=
abs( x[i] ) ;
189 assert(t1.
get_etat() != ETATNONDEF) ;
190 assert(t2.
get_etat() != ETATNONDEF) ;
192 int norm2 =
norme(t2) ;
193 int normdiff =
norme(t1-t2) ;
196 resu = double(normdiff) ;
199 resu = double(normdiff) / double(norm2) ;
213 assert(t1.
get_etat() != ETATNONDEF) ;
214 assert(t2.
get_etat() != ETATNONDEF) ;
217 int maxdiff =
max(
abs(t1-t2)) ;
220 resu = double(maxdiff) ;
223 resu = double(maxdiff) / double(max2) ;
Basic integer array class.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Dim_tbl dim
Number of dimensions, size,...
int get_etat() const
Gives the logical state.
int * t
The array of int 's.
int get_taille() const
Gives the total size (ie dim.taille )
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp abs(const Cmp &)
Absolute value.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).