- Timestamp:
- May 30, 2016, 5:03:40 PM (8 years ago)
- Branches:
- (u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
- Children:
- e07fa918e46981e53aa69816b1ee0abceadaab88
- Parents:
- 48cbb08675244a2938cd9318ad2f38b0c70e5172
- Location:
- kernel/GBEngine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
r48cbb0 r2f028d 4648 4648 } 4649 4649 4650 4651 // sorts by degree and pLtCmp 4652 // but puts pure monomials at the beginning 4653 int posInSMonFirst (const kStrategy strat, const int length,const poly p, 4654 const int ecart_p) 4655 { 4656 if (length<0) return 0; 4657 if(pNext(p) == NULL) return 0; 4658 polyset set=strat->S; 4659 int o = p_Deg(p,currRing); 4660 int op = p_Deg(set[length],currRing); 4661 4662 if ((op < o) 4663 || ((op == o) && (pLtCmp(set[length],p) == -1))) 4664 return length+1; 4665 int i; 4666 int an = 0; 4667 for(i=0;i<=length;i++) 4668 if(set[i] != NULL && pNext(set[i]) == NULL) 4669 an++; 4670 int en= length; 4671 loop 4672 { 4673 if (an >= en-1) 4674 { 4675 op = p_Deg(set[an],currRing); 4676 if ((op < o) 4677 || ((op == o) && (pLtCmp(set[an],p) == -1))) 4678 return en; 4679 return an; 4680 } 4681 i=(an+en) / 2; 4682 op = p_Deg(set[i],currRing); 4683 if ((op < o) 4684 || ((op == o) && (pLtCmp(set[i],p) == -1))) 4685 an=i; 4686 else 4687 en=i; 4688 } 4689 } 4650 4690 4651 4691 /*2 -
kernel/GBEngine/kutil.h
r48cbb0 r2f028d 426 426 int posInS (const kStrategy strat, const int length, const poly p, 427 427 const int ecart_p); 428 int posInSMonFirst (const kStrategy strat, const int length, const poly p, 429 const int ecart_p); 428 430 int posInT0 (const TSet set,const int length,LObject &p); 429 431 int posInT1 (const TSet set,const int length,LObject &p);
Note: See TracChangeset
for help on using the changeset viewer.