Changeset 111a66 in git
- Timestamp:
- Sep 21, 2004, 8:28:29 PM (20 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
- Children:
- 481ed7f68993bf02f4d42dd61ae707209d68f66d
- Parents:
- ccf647a6cd257d5e48da01b6035ada913fcf5202
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/tgb.cc
rccf647 r111a66 107 107 if(p1->f>p2->f) return 1; 108 108 if(p1->f<p2->f) return -1; 109 int c=pLmCmp(p1->f,p2->f); 110 if (c !=0) return c; 111 c=pLmCmp(p1->m,p2->m); 112 return c; 109 110 return pLmCmp(p1->m,p2->m); 111 113 112 } 114 113 static int pLmCmp_func(const void* ap1, const void* ap2){ … … 2775 2774 2776 2775 //better algorithm replace p by its monoms, qsort,delete duplicates and binary search for testing if monom is contained in array 2777 2776 qsort(p, p_index,sizeof(poly),pLmCmp_func); 2777 for(i=0;i<p_index;i++) 2778 pDelete(&p[i]->next); 2778 2779 for(i=m_index-1;i>=0;--i) 2779 2780 { 2780 2781 int j; 2782 int pos=posInPolys (p,p_index, m[i],c); 2781 2783 BOOLEAN minus=FALSE; 2782 for(j=0;j<p_index;j++) 2783 if (pLmEqual(p[j],m[i])) 2784 { 2785 minus=TRUE; 2786 break; 2787 } 2784 if(((p_index>pos)&&(pLmEqual(m[i],p[pos]))) ||(pos>0) &&(pLmEqual(m[i],p[pos-1]))) 2785 minus=TRUE; 2786 2788 2787 if(minus) 2789 2788 { … … 2797 2796 } 2798 2797 } 2798 2799 // for(i=m_index-1;i>=0;--i) 2800 // { 2801 // int j; 2802 // BOOLEAN minus=FALSE; 2803 // for(j=0;j<p_index;j++) 2804 // if (pLmEqual(p[j],m[i])) 2805 // { 2806 // minus=TRUE; 2807 // break; 2808 // } 2809 // if(minus) 2810 // { 2811 // F_minus[F_minus_index++]=m[i]; 2812 // m[i]=NULL; 2813 // } 2814 // else 2815 // { 2816 // F_plus[F_plus_index++]=m[i]; 2817 // m[i]=NULL; 2818 // } 2819 // } 2799 2820 //in this order F_minus will be automatically ascending sorted 2800 2821 //to make this sure for foreign gauss
Note: See TracChangeset
for help on using the changeset viewer.