Changeset 634b60 in git
- Timestamp:
- Feb 18, 2003, 6:14:59 PM (21 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- aa9fb6f8881d66822a503d2cb47d89c6add6be24
- Parents:
- c2c418bf9e9970a136f359e9c9c80e43741188fc
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/tgb.cc
rc2c418 r634b60 7 7 // "e" 8 8 // multiple rings 9 // shorten_tails und dessen Aufrufe pruefen wlength!!! 9 10 #include "tgb.h" 10 11 #define OM_KEEP 0 … … 680 681 h=omalloc(n*sizeof(char*)); 681 682 c->states=(char**) h; 682 683 c->deg=(int **) omalloc(n*sizeof(int*));684 683 h=omalloc(n*sizeof(int)); 685 684 c->lengths=(int*) h; … … 822 821 c->gcd_of_terms=(poly*) omrealloc(c->gcd_of_terms, c->n *sizeof(poly)); 823 822 c->gcd_of_terms[i]=gcd_of_terms(h,c->r); 824 c->deg=(int**) omrealloc(c->deg, c->n * sizeof(int*));825 823 c->rep[i]=i; 826 824 hp=omalloc(i*sizeof(char)); … … 830 828 exit(1); 831 829 } 832 c->deg[i]=(int*) omalloc(i*sizeof(int));833 830 hp=omrealloc(c->S->m,c->n*sizeof(poly)); 834 831 if (hp!=NULL){ … … 840 837 c->short_Exps[i]=p_GetShortExpVector(h,c->r); 841 838 for (j=0;j<i;j++){ 842 c->deg[i][j]=pLcmDeg(c->S->m[i],c->S->m[j]);843 839 if (c->rep[j]==j){ 844 840 //check product criterion … … 1565 1561 omfree(c->states); 1566 1562 omfree(c->lengths); 1563 1564 1565 omfree(c->short_Exps); 1566 omfree(c->T_deg); 1567 int i; 1568 for(i=0;i<c->n;i++){ 1569 if(c->gcd_of_terms[i]) 1570 pDelete(&(c->gcd_of_terms[i])); 1571 } 1572 omfree(c->gcd_of_terms); 1573 1574 omfree(c->apairs); 1567 1575 printf("calculated %d NFs\n",c->normal_forms); 1568 1576 printf("applied %i product crit, %i extended_product crit \n", c->easy_product_crit, c->extended_product_crit); … … 1904 1912 struct find_erg{ 1905 1913 poly expand; 1914 int expand_length; 1906 1915 int to_reduce_u; 1907 1916 int to_reduce_l; … … 1954 1963 { 1955 1964 if (erg.to_reduce_u>erg.to_reduce_l){ 1965 1956 1966 int i; 1957 1967 int quality_a=quality_of_pos_in_strat_S(erg.reduce_by,c); … … 1974 1984 } 1975 1985 } 1986 else 1987 { 1988 assume(erg.to_reduce_u==erg.to_reduce_l); 1989 int quality_a=quality_of_pos_in_strat_S(erg.reduce_by,c); 1990 int qc=guess_quality(los[erg.to_reduce_u],c); 1991 if(qc<quality_a){ 1992 BOOLEAN exp=FALSE; 1993 if(qc<=2) 1994 exp=TRUE; 1995 else { 1996 if (qc<quality_a/2) 1997 exp=TRUE; 1998 else 1999 if(erg.reduce_by<c->n/4) 2000 exp=TRUE; 2001 } 2002 if (exp){ 2003 poly clear_into; 2004 2005 kBucketClear(los[erg.to_reduce_u].bucket,&clear_into,&erg.expand_length); 2006 erg.expand=pCopy(clear_into); 2007 kBucketInit(los[erg.to_reduce_u].bucket,clear_into,erg.expand_length); 2008 PrintS("e"); 2009 2010 } 2011 } 2012 2013 2014 } 2015 1976 2016 swap_roles=FALSE; 1977 2017 return; … … 2270 2310 // sort_region_down(los, 0, losl-1, c); 2271 2311 // qsort(los,losl,sizeof(red_object),red_object_better_gen); 2312 if(erg.expand) 2313 add_to_reductors(c,erg.expand,erg.expand_length); 2272 2314 } 2273 2315 return; -
Singular/tgb.h
rc2c418 r634b60 65 65 long* short_Exps; 66 66 kStrategy strat; 67 int** deg;68 67 int* T_deg; 69 68 poly* gcd_of_terms;
Note: See TracChangeset
for help on using the changeset viewer.