Changeset dad0bc5 in git for factory/NTLconvert.cc
- Timestamp:
- Dec 9, 2005, 9:35:38 AM (18 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 172b7ae49955a6c96c685cbe68ee3f257d89bd46
- Parents:
- 1b82a2e051a986276fd759237c823aecfb97b2be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/NTLconvert.cc
r1b82a2 rdad0bc5 1 /* $Id: NTLconvert.cc,v 1.1 3 2004-01-19 11:26:19Singular Exp $ */1 /* $Id: NTLconvert.cc,v 1.14 2005-12-09 08:35:37 Singular Exp $ */ 2 2 #include <config.h> 3 3 … … 419 419 } 420 420 421 int NTLcmpCF( const CFFactor & f, const CFFactor & g )422 {423 if (f.exp() > g.exp()) return 1;424 if (f.exp() < g.exp()) return 0;425 if (f.factor() > g.factor()) return 1;426 return 0;427 }428 429 421 //////////////////////////////////////////////////////////////////////////////// 430 422 // NAME: convertNTLvec_pair_ZZpX_long2FacCFFList // … … 468 460 rueckgabe.append(CFFactor(convertNTLZZpX2CF(e[i].a,x),e[i].b)); 469 461 } 470 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);471 462 // the multiplicity at pos 1 472 463 if (!IsOne(multi)) … … 495 486 rueckgabe.append(CFFactor(convertNTLzzpX2CF(e[i].a,x),e[i].b)); 496 487 } 497 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);498 488 // the multiplicity at pos 1 499 489 if (!IsOne(multi)) … … 556 546 rueckgabe.append(CFFactor(bigone,exponent)); 557 547 } 558 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);559 548 return rueckgabe; 560 549 } … … 777 766 rueckgabe.append(CFFactor(bigone,exponent)); 778 767 } 779 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);780 768 // the multiplicity at pos 1 781 769 //if (!IsOne(multi)) … … 869 857 rueckgabe.append(CFFactor(bigone,exponent)); 870 858 } 871 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);872 859 // Start by appending the multiplicity 873 860 if (!IsOne(multi)) … … 914 901 rueckgabe.append(CFFactor(bigone,exponent)); 915 902 } 916 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);917 903 // Start by appending the multiplicity 918 904 if (!IsOne(multi)) … … 1007 993 1008 994 } 1009 if(isOn(SW_USE_NTL_SORT)) rueckgabe.sort(NTLcmpCF);1010 995 // return the computed CFFList 1011 996 return rueckgabe;
Note: See TracChangeset
for help on using the changeset viewer.