Changeset 78e2fd in git for factory/canonicalform.cc
- Timestamp:
- Jul 14, 1997, 2:45:07 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- e1a0bd7739355c4d2a5c76f07eae73d641b31c3c
- Parents:
- 9ea9c61e58613776c6f87c9b161c4ba78f200283
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/canonicalform.cc
r9ea9c6 r78e2fd 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: canonicalform.cc,v 1. 8 1997-07-01 12:48:00schmidt Exp $ */2 /* $Id: canonicalform.cc,v 1.9 1997-07-14 12:45:07 schmidt Exp $ */ 3 3 4 4 #include <config.h> … … 227 227 } 228 228 229 //{{{ int CanonicalForm::degree() const 230 //{{{ docu 231 // 232 // degree() - return degree in main variable. 233 // 234 // Returns -1 for the zero polynomial. 235 // 236 //}}} 229 237 int 230 238 CanonicalForm::degree() const … … 237 245 return value->degree(); 238 246 } 239 247 //}}} 248 249 //{{{ int CanonicalForm::degree( const Variable & v ) const 250 //{{{ docu 251 // 252 // degree() - return degree in variable v. 253 // 254 // Returns -1 for the zero polynomial. 255 // 256 // Note: If v is less than the main variable of CO we have to swap 257 // variables which may be quite expensive. Calculating the degree in 258 // respect to an algebraic variable may fail. 259 // 260 //}}} 240 261 int 241 262 CanonicalForm::degree( const Variable & v ) const … … 250 271 return value->degree(); 251 272 else if ( v > mvar() ) 273 // relatively to v, f is in a coefficient ring 252 274 return 0; 253 275 else { 276 // v < mvar(), make v main variable 254 277 CanonicalForm f = swapvar( *this, v, mvar() ); 255 if ( f.mvar() == mvar() ) 256 return f.value->degree(); 257 else 278 if ( f.mvar() == mvar() ) 279 return f.value->degree(); 280 else 281 // in this case, we lost our main variable because 282 // v did not occur in CO 258 283 return 0; 259 284 } 260 285 } 286 //}}} 261 287 262 288 int … … 1137 1163 Off( SW_FAC_QUADRATICLIFT ); 1138 1164 Off( SW_USE_EZGCD ); 1165 Off( SW_USE_SPARSEMOD ); 1139 1166 1140 1167 (void)initializeCharacteristic();
Note: See TracChangeset
for help on using the changeset viewer.