Changeset 112e09 in git
- Timestamp:
- Mar 4, 2007, 11:56:16 PM (17 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- c11c4daf7e3896aeb978b0e5d088aa00da640998
- Parents:
- f52b35d84241ce7e7505d2fc317f785452810345
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/pInline2.h
rf52b35d r112e09 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: pInline2.h,v 1.1 0 2007-01-31 23:51:24 motsakExp $9 * Version: $Id: pInline2.h,v 1.11 2007-03-04 22:56:16 levandov Exp $ 10 10 *******************************************************************/ 11 11 #ifndef PINLINE2_H … … 152 152 PINLINE2 int p_Comp_k_n(poly a, poly b, int k, ring r) 153 153 { 154 if ((a==NULL) || (b==NULL) ) return FALSE; 154 155 p_LmCheckPolyRing2(a, r); 155 156 p_LmCheckPolyRing2(b, r); … … 158 159 for(;i<=r->N;i++) 159 160 { 160 if(a->exp[(r->VarOffset[i] & 0xffffff)] 161 != b->exp[(r->VarOffset[i] & 0xffffff)]) 162 return FALSE; 161 if (a->exp[(r->VarOffset[i] & 0xffffff)] != b->exp[(r->VarOffset[i] & 0xffffff)]) return FALSE; 163 162 } 164 163 return TRUE; -
kernel/ratgring.cc
rf52b35d r112e09 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: ratgring.cc,v 1. 2 2007-03-04 18:18:17levandov Exp $9 * Version: $Id: ratgring.cc,v 1.3 2007-03-04 22:56:16 levandov Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 63 63 { 64 64 poly q = pNext(p); 65 if (q == NULL) return p; 65 66 poly res = p_Head(p,r); 66 67 while ( p_Comp_k_n(p, q, ishift, r) ) … … 108 109 h->m[1] = p_Copy(q,r); 109 110 #ifdef PDEBUG 110 Print("running syzygy comp. for nc_GCD: ");111 Print("running syzygy comp. for nc_GCD:\n"); 111 112 #endif 112 113 ideal sh = idSyzygies(h, testHomog, &w); 113 114 #ifdef PDEBUG 114 Print("done syzygy comp. for nc_GCD ");115 Print("done syzygy comp. for nc_GCD\n"); 115 116 #endif 116 117 /* in comm case, there is only 1 syzygy */ … … 119 120 K = sh->m[0]; /* take just the first element - to be enhanced later */ 120 121 K1 = pTakeOutComp(&K, 1); // 1st component is taken out from K 122 // K2 = pTakeOutComp(&K, 2); 123 p_SetCompP(K1,0,r); 121 124 pShift(&K,-2); // 2nd component to 0th comp. 122 K2 = K; 125 // K2 = pTakeOutComp(&K, 2); 126 p_SetCompP(K2,0,r); 127 K2 = K; 123 128 124 129 /* checking signs before multiplying */ … … 136 141 idDelete(&h); 137 142 h = idInit(2,1); 138 h->m[0] = K1;139 h->m[1] = K2;143 h->m[0] = p_Copy(K1,r); 144 h->m[1] = p_Copy(K2,r); 140 145 idDelete(&sh); 141 146 return(h); … … 327 332 /* pSetComp(m,r)=0? */ 328 333 poly HH, H; 329 HH = p_ HeadRat(p1,is,r); // lm_D(g)334 HH = p_Copy(p_HeadRat(p1,is,r),r); // lm_D(g) 330 335 H = r->nc->p_Procs.mm_Mult_p(m, p_Copy(HH, r), r); // d^aplha lm_D(g) 331 336 … … 341 346 342 347 ideal ncsyz = ncGCD(P,K,r); 343 poly KK = ncsyz->m[0]; // k'344 poly PP = ncsyz->m[1]; // p'348 poly KK = p_Copy(ncsyz->m[0],r); // k' 349 poly PP = p_Copy(ncsyz->m[1],r); // p' 345 350 346 HH = p_ HeadRat(p2,is,r);351 HH = p_Copy(p_HeadRat(p2,is,r),r); 347 352 HH = p_Neg(HH, r); 348 353 p2 = p_Add_q(p2, HH, r); // t_f … … 352 357 353 358 354 HH = p_ HeadRat(H,is,r);359 HH = p_Copy(p_HeadRat(H,is,r),r); 355 360 HH = p_Neg(HH, r); 356 361 H = p_Add_q(H, HH, r); // r_g … … 360 365 361 366 362 p2 = p_Mult_ mm(p2, KK, r); // p2 = k' t_f367 p2 = p_Mult_q(p2, KK, r); // p2 = k' t_f 363 368 p_Test(p2,r); 364 p_Delete(&KK,r);369 // p_Delete(&KK,r); 365 370 366 371 out = r->nc->p_Procs.mm_Mult_p(m, out, r); // d^aplha t_g
Note: See TracChangeset
for help on using the changeset viewer.