void mmx::vct::accconv | ( | C * | r, | |
int | str, | |||
const C * | a, | |||
unsigned | na, | |||
int | sta, | |||
const C * | b, | |||
unsigned | nb, | |||
int | stb | |||
) | [inline] |
standard convolution loop, do not initialize r.
r | base address of the result. | |
str | increment for r. | |
a | base address of first operand. | |
na | number of coefficients for a. | |
sta | increment for a. | |
b | base address of second operand. | |
nb | number of coefficients for a. | |
stb | increment for b. |
Definition at line 277 of file tensor_vctops.hpp.
References C.
Referenced by conv().
void mmx::vct::accmax | ( | A & | mx, | |
const B * | v, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 192 of file tensor_vctops.hpp.
Referenced by max().
void mmx::vct::accmin | ( | A & | mn, | |
B const * | v, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 177 of file tensor_vctops.hpp.
Referenced by min().
void mmx::vct::conv | ( | C * | r, | |
int | str, | |||
const C * | a, | |||
unsigned | na, | |||
int | sta, | |||
const C * | b, | |||
unsigned | nb, | |||
int | stb | |||
) | [inline] |
standard convolution loop.
r | base address of the result. | |
str | increment for r. | |
a | base address of first operand. | |
na | number of coefficients for a. | |
sta | increment for a. | |
b | base address of second operand. | |
nb | number of coefficients for a. | |
stb | increment for b. |
Definition at line 300 of file tensor_vctops.hpp.
void mmx::vct::conv | ( | C * | r, | |
unsigned | nr, | |||
int | str, | |||
const C * | a, | |||
unsigned | na, | |||
int | sta, | |||
const C * | b, | |||
unsigned | nb, | |||
int | stb | |||
) | [inline] |
truncated convolution loop:
r | base address of the result. | |
nr | number of coefficients wanted. | |
str | increment for r. | |
a | base address of first operand. | |
na | number of coefficients for a. | |
sta | increment for a. | |
b | base address of second operand. | |
nb | number of coefficients for a. | |
stb | increment for b. |
Definition at line 229 of file tensor_vctops.hpp.
00237 { 00238 if ( na < nb ) { conv(r,nr,str,b,nb,stb,a,na,sta); return; }; 00239 int k, l; 00240 C * er; 00241 const C * ea, * eb, * eeb, * eea; 00242 er = r; 00243 eb = b; 00244 00245 for ( er = r, eb = b, k = 0; k < std::min(nb,nr); k ++, er += str, eb += stb ) 00246 for ( eeb = eb, ea = a, *er = 0, l = 0; 00247 l <= k; 00248 *er += *ea**eeb, l ++, eeb -= stb, ea += sta ) ; 00249 00250 for ( ; k < std::min(na,nr) ; k ++, er += str ) 00251 for ( *er = 0, 00252 l = k-nb+1, eeb = b +(nb-1)*stb , ea = a + l*sta; 00253 l <= k; 00254 *er+= *ea**eeb, 00255 l ++, eeb -= stb, ea += sta ) ; 00256 00257 for ( ; k < nr; k ++, er += str ) 00258 for ( *er = 0, 00259 l = k-nb+1, eeb = b+(nb-1)*stb, ea = a + l*sta; 00260 l < na; 00261 *er += *ea**eeb, 00262 l ++, eeb -= stb, ea += sta ) ; 00263 };
void mmx::vct::copy | ( | A * | a, | |
const B * | b, | |||
unsigned | n, | |||
int | sa, | |||
int | sb | |||
) | [inline] |
Definition at line 146 of file tensor_vctops.hpp.
void mmx::vct::copy | ( | A * | a, | |
const B * | b, | |||
unsigned | n | |||
) | [inline] |
Definition at line 140 of file tensor_vctops.hpp.
Referenced by mmx::tensor::binoms(), and mmerge().
00141 { 00142 std::copy(b,b+n,a) ; 00143 };
void mmx::vct::decasteljau | ( | C * | c, | |
unsigned | n, | |||
const I & | i, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 459 of file tensor_vctops.hpp.
References C.
00460 { 00461 C *ec, *p; 00462 for ( ec = c + (n-1)*s; ec != c; ec -= s ) 00463 for ( p = c; p != ec; p += s ) 00464 *p = (1.0-i)**p+i**(p+s) ; 00465 };
void mmx::vct::dhorner | ( | O & | p, | |
O & | dp, | |||
C const *const | c, | |||
unsigned | n, | |||
const I & | t, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 468 of file tensor_vctops.hpp.
void mmx::vct::diff | ( | C * | dst, | |
C const *const | src, | |||
unsigned | sz, | |||
int | st = 1 | |||
) | [inline] |
Definition at line 453 of file tensor_vctops.hpp.
void mmx::vct::fill | ( | C * | a, | |
unsigned | n, | |||
int | s, | |||
const C & | x | |||
) | [inline] |
Definition at line 152 of file tensor_vctops.hpp.
References C.
Referenced by binary_sleeve_subdivision< K >::barre(), mmx::tensor::clear(), mmx::realroot::fill_data(), mmx::linear::LUinverse(), mcrossp(), mdotp(), msimplify(), and pmmul().
texp::sup<C,I>::T mmx::vct::hhorner | ( | C const *const | c, | |
unsigned | n, | |||
const I & | i, | |||
const I & | i0, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 444 of file tensor_vctops.hpp.
References hhorner().
00445 { 00446 typename texp::ringof<C,I>::T o(0); 00447 hhorner(o,c,n,i,i0,s) ; 00448 return o; 00449 };
void mmx::vct::hhorner | ( | O & | o, | |
C const *const | c, | |||
unsigned | n, | |||
const I & | i, | |||
const I & | i0, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 436 of file tensor_vctops.hpp.
Referenced by mmx::tensor::hevalm(), and hhorner().
texp::sup<C,I>::T mmx::vct::horner | ( | C const *const | c, | |
unsigned | n, | |||
const I & | i, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 428 of file tensor_vctops.hpp.
References horner().
00429 { 00430 typename texp::ringof<C,I>::T o(0); 00431 horner(o,c,n,i,s); 00432 return o; 00433 };
void mmx::vct::horner | ( | O & | o, | |
C const *const | c, | |||
unsigned | n, | |||
const I & | i, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 420 of file tensor_vctops.hpp.
Referenced by horner().
void mmx::vct::icopy | ( | A * | a, | |
unsigned * | aadd, | |||
unsigned | nadd, | |||
const B * | b | |||
) | [inline] |
Definition at line 158 of file tensor_vctops.hpp.
Referenced by mmx::tensor::add(), mmx::tensor::extend(), and mmx::tensor::sub().
void mmx::vct::inverses | ( | A * | a, | |
A * | ea | |||
) | [inline] |
Definition at line 476 of file tensor_vctops.hpp.
Referenced by mmx::tensor::ibinoms().
void mmx::vct::ipadd | ( | A * | a, | |
unsigned * | aadd, | |||
unsigned | nadd, | |||
const B * | b | |||
) | [inline] |
Definition at line 164 of file tensor_vctops.hpp.
Referenced by mmx::tensor::add(), and mmx::tensor::waddm().
void mmx::vct::ipsub | ( | A * | a, | |
unsigned * | aadd, | |||
unsigned | nadd, | |||
const B * | b | |||
) | [inline] |
Definition at line 170 of file tensor_vctops.hpp.
Referenced by mmx::tensor::sub(), and mmx::tensor::wsubm().
real_t mmx::vct::max | ( | real_t const * | src, | |
int | sz, | |||
int | st = 1 | |||
) | [inline] |
Definition at line 488 of file tensor_vctops.hpp.
void mmx::vct::max | ( | A & | mx, | |
B const * | v, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 200 of file tensor_vctops.hpp.
References accmax().
00201 { 00202 mx = v[0]; 00203 accmax(mx,v,n,s) ; 00204 };
real_t mmx::vct::min | ( | real_t const * | src, | |
int | sz, | |||
int | st = 1 | |||
) | [inline] |
Definition at line 480 of file tensor_vctops.hpp.
void mmx::vct::min | ( | A & | mn, | |
B const * | v, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 185 of file tensor_vctops.hpp.
References accmin().
Referenced by conv().
00186 { 00187 mn = v[0]; 00188 accmin(mn,v+s,n-1,s) ; 00189 };
void mmx::vct::minmax | ( | C & | m, | |
C & | M, | |||
const C * | a, | |||
unsigned | n, | |||
unsigned | s = 1 | |||
) | [inline] |
m | minimum value. | |
M | maximum value. | |
a | base address of coefficients. | |
n | number of coefficients. | |
s | increment used to access a. |
Definition at line 317 of file tensor_vctops.hpp.
References C.
void mmx::vct::mmerge | ( | C * | r, | |
int | str, | |||
const C * | a, | |||
unsigned | na, | |||
int | sta, | |||
const C * | b, | |||
unsigned | nb, | |||
int | stb | |||
) | [inline] |
Definition at line 355 of file tensor_vctops.hpp.
References C.
00358 { 00359 C * er(r); 00360 const C * ea(a), * eb(b); 00361 00362 a += na*sta; 00363 b += nb*stb; 00364 00365 for (;;) 00366 { 00367 for (;ea != a && *ea < *eb; *er = *ea, er += str, ea += sta ) ; 00368 00369 if ( ea == a ) 00370 { 00371 for ( ; eb != b; *er = *eb, er += str, eb += stb ) ; 00372 break; 00373 }; 00374 00375 if ( *ea == *eb ) 00376 { 00377 *er = *ea; 00378 er += str; 00379 ea += sta; 00380 eb += stb; 00381 }; 00382 00383 for (;eb != b && *eb < *ea; *er = *eb, er += str, eb += stb ) ; 00384 00385 if ( eb == b ) 00386 { 00387 for ( ; ea != a; *er = *ea, er += str, ea += sta ) ; 00388 break; 00389 }; 00390 00391 if ( *eb == *ea ) 00392 { 00393 *er = *eb; 00394 er += str; 00395 eb += stb; 00396 ea += sta; 00397 }; 00398 }; 00399 return (er - r)/str; 00400 };
unsigned mmx::vct::mmerge | ( | C * | r, | |
const C * | a, | |||
const C * | b, | |||
unsigned | na, | |||
unsigned | nb | |||
) | [inline] |
Definition at line 335 of file tensor_vctops.hpp.
00337 { 00338 C * er(r); 00339 const C * ea(a), * eb(b); 00340 a += na; 00341 b += nb; 00342 for (;;) 00343 { 00344 while( ea < a && *ea < *eb ) *er++ = *ea++; 00345 if ( ea == a ) { std::copy(eb,b,er) ; break; }; 00346 if ( *ea == *eb ) { *er++ = *ea++; eb++;}; 00347 while( eb < b && *eb < *ea ) *er++ = *eb++; 00348 if ( eb == b ) { std::copy(ea,a,er); break; }; 00349 if ( *eb == *ea ) { *er++ = *eb++; ea++;}; 00350 }; 00351 return er-r; 00352 };
void mmx::vct::padd | ( | A * | a, | |
const B * | b, | |||
const C * | c, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 , |
|||
int | stc = 1 | |||
) | [inline] |
Definition at line 19 of file tensor_vctops.hpp.
void mmx::vct::padd | ( | A * | a, | |
const B * | b, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 | |||
) | [inline] |
Definition at line 13 of file tensor_vctops.hpp.
void mmx::vct::pdiv | ( | A * | a, | |
const B * | b, | |||
const C * | c, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 , |
|||
int | stc = 1 | |||
) | [inline] |
Definition at line 56 of file tensor_vctops.hpp.
void mmx::vct::pdiv | ( | A * | a, | |
const B * | b, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 | |||
) | [inline] |
Definition at line 50 of file tensor_vctops.hpp.
Referenced by mmx::tensor::uscale().
void mmx::vct::pmul | ( | A * | a, | |
const B * | b, | |||
const C * | c, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 , |
|||
int | stc = 1 | |||
) | [inline] |
Definition at line 44 of file tensor_vctops.hpp.
void mmx::vct::pmul | ( | A * | a, | |
const B * | b, | |||
int | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 | |||
) | [inline] |
Definition at line 38 of file tensor_vctops.hpp.
Referenced by mmx::tensor::binoms(), and mmx::tensor::scale().
void mmx::vct::print | ( | const A * | p, | |
unsigned | n, | |||
int | st = 1 , |
|||
std::ostream & | o = std::cout | |||
) | [inline] |
Definition at line 206 of file tensor_vctops.hpp.
void mmx::vct::psub | ( | A * | a, | |
const B * | b, | |||
const C * | c, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 , |
|||
int | stc = 1 | |||
) | [inline] |
Definition at line 32 of file tensor_vctops.hpp.
void mmx::vct::psub | ( | A * | a, | |
const B * | b, | |||
unsigned | sz, | |||
int | sta = 1 , |
|||
int | stb = 1 | |||
) | [inline] |
Definition at line 26 of file tensor_vctops.hpp.
void mmx::vct::scadd | ( | A * | a, | |
const B * | b, | |||
const C & | c, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 68 of file tensor_vctops.hpp.
void mmx::vct::scadd | ( | A * | a, | |
const B & | b, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 62 of file tensor_vctops.hpp.
static void mmx::vct::scale | ( | C * | p, | |
const C & | s, | |||
unsigned | n, | |||
int | is = 1 | |||
) | [inline, static] |
Definition at line 413 of file tensor_vctops.hpp.
References C.
00414 { 00415 C pw = s; 00416 for (C * cp = p + is; cp != p + n * is; *cp *= pw, pw *= s, cp += is) ; 00417 };
void mmx::vct::scdiv | ( | A * | a, | |
const C & | c, | |||
const B * | b, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 134 of file tensor_vctops.hpp.
void mmx::vct::scdiv | ( | A * | a, | |
const B * | b, | |||
const C & | c, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 128 of file tensor_vctops.hpp.
void mmx::vct::scdiv | ( | const B & | b, | |
A * | a, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 122 of file tensor_vctops.hpp.
void mmx::vct::scdiv | ( | A * | a, | |
const B & | b, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 116 of file tensor_vctops.hpp.
void mmx::vct::scmul | ( | A * | a, | |
const A * | _a, | |||
const B * | b, | |||
const C & | c | |||
) | [inline] |
Definition at line 110 of file tensor_vctops.hpp.
void mmx::vct::scmul | ( | A * | a, | |
const B * | b, | |||
const C & | c, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 104 of file tensor_vctops.hpp.
void mmx::vct::scmul | ( | A * | a, | |
const B & | b, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 98 of file tensor_vctops.hpp.
Referenced by mmx::tensor::mdiff().
void mmx::vct::scsub | ( | A * | a, | |
const B & | b, | |||
const C * | c, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 92 of file tensor_vctops.hpp.
void mmx::vct::scsub | ( | A * | a, | |
const B * | b, | |||
const C & | c, | |||
unsigned | n, | |||
int | sa = 1 , |
|||
int | sb = 1 | |||
) | [inline] |
Definition at line 86 of file tensor_vctops.hpp.
void mmx::vct::scsub | ( | const B & | b, | |
A * | a, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 80 of file tensor_vctops.hpp.
void mmx::vct::scsub | ( | A * | a, | |
const B & | b, | |||
unsigned | n, | |||
int | s = 1 | |||
) | [inline] |
Definition at line 74 of file tensor_vctops.hpp.
static void mmx::vct::shift | ( | C * | p, | |
const C & | c, | |||
unsigned | n, | |||
int | is = 1 | |||
) | [inline, static] |
Definition at line 405 of file tensor_vctops.hpp.