MCPcopy Create free account
hub / github.com/Singular/Singular / swapRoots

Method swapRoots

kernel/numeric/mpr_numeric.cc:417–433  ·  view source on GitHub ↗

-> bool rootContainer::changeRoots( int from, int to )

Source from the content-addressed store, hash-verified

415
416//-> bool rootContainer::changeRoots( int from, int to )
417bool 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()

Callers 1

arrangeMethod · 0.80

Calls 1

WarnFunction · 0.85

Tested by

no test coverage detected