Changeset 3ace5b6 in git
- Timestamp:
- Jul 24, 2012, 1:48:24 PM (11 years ago)
- Branches:
- (u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
- Children:
- f55f3941f7a85ba15e8bc819fdb09964b90ea669
- Parents:
- 8681bf84c636b8f6dc4a144d33450d09a28c5154
- git-author:
- Martin Lee <martinlee84@web.de>2012-07-24 13:48:24+02:00
- git-committer:
- Martin Lee <martinlee84@web.de>2012-09-04 17:25:37+02:00
- Location:
- factory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/canonicalform.cc
r8681bf r3ace5b6 478 478 // have a taildegree larger than zero. 479 479 // 480 // tailcoeff( v ) returns the tail coefficient of CO where CO is 481 // considered an univariate polynomial in the polynomial variable 482 // v. 483 // Note: If v is less than the main variable of CO we have to 484 // swap variables which may be quite expensive. 485 // 480 486 // See also: InternalCF::tailcoeff(), InternalCF::tailcoeff(), 481 487 // InternalPoly::tailcoeff(), InternalPoly::taildegree, … … 490 496 else 491 497 return value->tailcoeff(); 498 } 499 500 CanonicalForm 501 CanonicalForm::tailcoeff (const Variable& v) const 502 { 503 if ( is_imm( value ) || value->inCoeffDomain() ) 504 return *this; 505 506 Variable x = value->variable(); 507 if ( v > x ) 508 return *this; 509 else if ( v == x ) 510 return value->tailcoeff(); 511 else { 512 CanonicalForm f = swapvar( *this, v, x ); 513 if ( f.mvar() == x ) 514 return swapvar( f.value->tailcoeff(), v, x ); 515 else 516 // v did not occur in f 517 return *this; 518 } 492 519 } 493 520 -
factory/canonicalform.h
r8681bf r3ace5b6 112 112 113 113 CanonicalForm tailcoeff () const; 114 CanonicalForm tailcoeff ( const Variable & v ) const; 114 115 int taildegree () const; 115 116 … … 295 296 tailcoeff ( const CanonicalForm & f ) { return f.tailcoeff(); } 296 297 298 inline CanonicalForm 299 tailcoeff (const CanonicalForm& f, const Variable& v) { return f.tailcoeff(v); } 300 297 301 inline int 298 302 level ( const CanonicalForm & f ) { return f.level(); }
Note: See TracChangeset
for help on using the changeset viewer.