CanonicalForm maxNorm ( const CanonicalForm & f ) * * * maxNorm() - return maximum norm of `f'. * * That is, the base coefficient of `f' with the largest absolute * value. * * Valid for arbitrary polynomials over arbitrary domains, but * most useful for multivariate polynomials over Z. * * Type info: * ---------- * f: CurrentPP * **/
| 533 | * |
| 534 | **/ |
| 535 | CanonicalForm |
| 536 | maxNorm ( const CanonicalForm & f ) |
| 537 | { |
| 538 | if ( f.inBaseDomain() ) |
| 539 | return abs( f ); |
| 540 | else { |
| 541 | CanonicalForm result = 0; |
| 542 | for ( CFIterator i = f; i.hasTerms(); i++ ) { |
| 543 | CanonicalForm coeffMaxNorm = maxNorm( i.coeff() ); |
| 544 | if ( coeffMaxNorm > result ) |
| 545 | result = coeffMaxNorm; |
| 546 | } |
| 547 | return result; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | /** CanonicalForm euclideanNorm ( const CanonicalForm & f ) |
| 552 | * |
no test coverage detected