Changeset 359f09 in git
- Timestamp:
- Dec 1, 2022, 11:48:21 AM (2 months ago)
- Branches:
- (u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
- Children:
- 5cc997784cbce4c118fa8bc8c2a902459d4068d4
- Parents:
- 5a0dde71de01068fad5736a17555c993ecbbf495
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kutil.cc
r5a0dde7 r359f09 389 389 //if ( !(n_IsUnit(pGetCoeff(p), r->cf)) ) return; 390 390 391 // for(i=r->N;i>0;i--)392 // {393 // if ((p_GetExp(p,i,r)>0) && (rIsPolyVar(i, r)==TRUE)) return;394 // }395 391 poly h = pNext(p); 396 392 int i; -
libpolys/polys/monomials/ring.cc
r5a0dde7 r359f09 2034 2034 } 2035 2035 2036 BOOLEAN rIsPolyVar(int v,const ring r)2037 {2038 int i=0;2039 while(r->order[i]!=0)2040 {2041 if((r->block0[i]<=v)2042 && (r->block1[i]>=v))2043 {2044 switch(r->order[i])2045 {2046 case ringorder_a:2047 return (r->wvhdl[i][v-r->block0[i]]>0);2048 case ringorder_M:2049 return 2; /*don't know*/2050 case ringorder_a64: /* assume: all weight are non-negative!*/2051 case ringorder_lp:2052 case ringorder_rs:2053 case ringorder_dp:2054 case ringorder_Dp:2055 case ringorder_wp:2056 case ringorder_Wp:2057 return TRUE;2058 case ringorder_ls:2059 case ringorder_ds:2060 case ringorder_Ds:2061 case ringorder_ws:2062 case ringorder_Ws:2063 return FALSE;2064 default:2065 break;2066 }2067 }2068 i++;2069 }2070 return 3; /* could not find var v*/2071 }2072 2073 2036 #ifdef RDEBUG 2074 2037 // This should eventually become a full-fledge ring check, like pTest … … 4397 4360 4398 4361 4399 // F = system("ISUpdateComponents", F, V, MIN );4400 // // replace gen(i) -> gen(MIN + V[i-MIN]) for all i > MIN in all terms from F!4401 void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r )4402 {4403 assume( V != NULL );4404 assume( MIN >= 0 );4405 4406 if( F == NULL )4407 return;4408 4409 for( int j = (F->ncols*F->nrows) - 1; j >= 0; j-- )4410 {4411 #ifdef PDEBUG4412 Print("F[%d]:", j);4413 p_wrp(F->m[j], r);4414 #endif4415 4416 for( poly p = F->m[j]; p != NULL; pIter(p) )4417 {4418 int c = p_GetComp(p, r);4419 4420 if( c > MIN )4421 {4422 #ifdef PDEBUG4423 Print("gen[%d] -> gen(%d)\n", c, MIN + (*V)[ c - MIN - 1 ]);4424 #endif4425 4426 p_SetComp( p, MIN + (*V)[ c - MIN - 1 ], r );4427 }4428 }4429 #ifdef PDEBUG4430 Print("new F[%d]:", j);4431 p_Test(F->m[j], r);4432 p_wrp(F->m[j], r);4433 #endif4434 }4435 }4436 4437 4362 /*2 4438 4363 * asssume that rComplete was called with r … … 5256 5181 return 0; 5257 5182 } 5258 }5259 5260 BOOLEAN rRing_is_Homog(const ring r)5261 {5262 if (r == NULL) return FALSE;5263 int i, j, nb = rBlocks(r);5264 for (i=0; i<nb; i++)5265 {5266 if (r->wvhdl[i] != NULL)5267 {5268 int length = r->block1[i] - r->block0[i]+1;5269 int* wvhdl = r->wvhdl[i];5270 if (r->order[i] == ringorder_M) length *= length;5271 5272 for (j=0; j< length; j++)5273 {5274 if (wvhdl[j] != 0 && wvhdl[j] != 1) return FALSE;5275 }5276 }5277 }5278 return TRUE;5279 5183 } 5280 5184 … … 5857 5761 #endif 5858 5762 5859 void rModify_a_to_A(ring r)5860 // to be called BEFORE rComplete:5861 // changes every Block with a(...) to A(...)5862 {5863 int i=0;5864 int j;5865 while(r->order[i]!=0)5866 {5867 if (r->order[i]==ringorder_a)5868 {5869 r->order[i]=ringorder_a64;5870 int *w=r->wvhdl[i];5871 int64 *w64=(int64 *)omAlloc((r->block1[i]-r->block0[i]+1)*sizeof(int64));5872 for(j=r->block1[i]-r->block0[i];j>=0;j--)5873 w64[j]=(int64)w[j];5874 r->wvhdl[i]=(int*)w64;5875 omFreeSize(w,(r->block1[i]-r->block0[i]+1)*sizeof(int));5876 }5877 i++;5878 }5879 }5880 5881 5882 5763 poly rGetVar(const int varIndex, const ring r) 5883 5764 { -
libpolys/polys/monomials/ring.h
r5a0dde7 r359f09 471 471 void rUnComplete(ring r); 472 472 473 BOOLEAN rRing_is_Homog(const ring r);474 473 BOOLEAN rRing_has_CompLastBlock(const ring r); 475 474 BOOLEAN rRing_ord_pure_dp(const ring r); … … 771 770 rOrderType_t rGetOrderType(ring r); 772 771 773 /// returns TRUE if var(i) belongs to p-block774 BOOLEAN rIsPolyVar(int i, const ring r);775 776 772 static inline BOOLEAN rOrd_is_Comp_dp(const ring r) 777 773 { … … 796 792 /// construct Wp, C ring 797 793 ring rModifyRing_Wp(ring r, int* weights); 798 void rModify_a_to_A(ring r);799 794 800 795 void rKillModifiedRing(ring r); … … 825 820 /// return the position of the p^th IS block order block in r->typ[]... 826 821 int rGetISPos(const int p, const ring r); 827 void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);828 822 829 823 BOOLEAN rCheckIV(const intvec *iv);
Note: See TracChangeset
for help on using the changeset viewer.