-> bool rootContainer::changeRoots( int from, int to )
| 415 | |
| 416 | //-> bool rootContainer::changeRoots( int from, int to ) |
| 417 | bool rootContainer::swapRoots( const int from, const int to ) |
| 418 | { |
| 419 | if ( found_roots && ( from >= 0) && ( from < tdg ) && ( to >= 0) && ( to < tdg ) ) |
| 420 | { |
| 421 | if ( to != from ) |
| 422 | { |
| 423 | gmp_complex tmp( *theroots[from] ); |
| 424 | *theroots[from]= *theroots[to]; |
| 425 | *theroots[to]= tmp; |
| 426 | } |
| 427 | return true; |
| 428 | } |
| 429 | |
| 430 | // warning |
| 431 | Warn(" rootContainer::changeRoots: Wrong index %d, %d",from,to); |
| 432 | return false; |
| 433 | } |
| 434 | //<- |
| 435 | |
| 436 | //-> void rootContainer::solver() |