Changeset 326434 in git
 Timestamp:
 Aug 7, 2008, 11:15:56 PM (15 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
 Children:
 350a6d224148d833e5548c77167a09e0efc470db
 Parents:
 322662c5b8af027d90ce23cdbf7a11d43ad0b912
 Location:
 kernel
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

kernel/gr_kstd2.cc
r322662 r326434 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1.2 4 20080804 07:31:13 SingularExp $ */4 /* $Id: gr_kstd2.cc,v 1.25 20080807 21:15:56 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT  Kernel: noncomm. alg. of Buchberger … … 257 257 c_p = nc_CreateSpoly(pCopy(strat>S[c_j]),pCopy((*h).p), currRing); 258 258 else 259 c_p=nc_rat_ReduceSpolyNew(pCopy(strat>S[c_j]), 260 pCopy((*h).p),currRing>real_var_start1,currRing); 259 c_p=nc_rat_ReduceSpolyNew(pCopy((*h).p), pCopy(strat>S[c_j]),currRing>real_var_start1,currRing); 261 260 pDelete(&((*h).p)); 262 261 (*h).p=c_p; 
kernel/ratgring.cc
r322662 r326434 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00  11/00 9 * Version: $Id: ratgring.cc,v 1.1 0 20080610 10:17:32 motsakExp $9 * Version: $Id: ratgring.cc,v 1.11 20080807 21:15:56 levandov Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 28 28 void pLcmRat(poly a, poly b, poly m, int rat_shift) 29 29 { 30 /* shift is the last exp one should count with */30 /* rat_shift is the last exp one should count with */ 31 31 int i; 32 for (i=pVariables; i =rat_shift; i)32 for (i=pVariables; i>=rat_shift; i) 33 33 { 34 34 pSetExp(m,i, si_max( pGetExp(a,i), pGetExp(b,i))); … … 121 121 poly t=pr; 122 122 Exponent_t e1,e2; 123 for (i=ishift+1 123 for (i=ishift+1; i<=r>N; i++) 124 124 { 125 125 e1 = p_GetExp(p1, i, r); … … 142 142 } 143 143 144 145 146 147 144 /* returns ideal (u,v) s.t. up + vq = 0 */ 148 145 149 ideal ncGCD (poly p, poly q, const ring r)146 ideal ncGCD2(poly p, poly q, const ring r) 150 147 { 151 148 intvec *w = NULL; … … 192 189 } 193 190 194 191 /* returns ideal (u,v) s.t. up + vq = 0 */ 192 193 ideal ncGCD(poly p, poly q, const ring r) 194 { 195 // assume: p,q are in the comm. ring 196 // to be used in the coeff business 197 #ifdef PDEBUG 198 Print("G_start:"); 199 #endif 200 poly g = singclap_gcd(p_Copy(p,r),p_Copy(q,r)); 201 #ifdef PDEBUG 202 p_wrp(g,r); 203 Print("G_end;"); 204 #endif 205 poly u = singclap_pdivide(q,g); //q/g 206 poly v = singclap_pdivide(p,g); //p/g 207 ideal h = idInit(2,1); 208 h>m[0] = u; // p_Copy(u,r); 209 h>m[1] = v; // p_Copy(v,r); 210 return(h); 211 } 195 212 196 213 /* PINLINE1 void p_ExpVectorDiff … … 368 385 369 386 poly m = pOne(); 370 p_ExpVectorDiffRat(m, p 2, p1, ishift, r); // includes X and D parts387 p_ExpVectorDiffRat(m, p1, p2, ishift, r); // includes X and D parts 371 388 //p_Setm(m,r); 372 389 // m = p_GetExp_k_n(m,1,ishift,r); /* rat Dexp of m */ … … 380 397 HH = p_Copy(p_HeadRat(p1,is,r),r); // lm_D(g) 381 398 // H = r>nc>p_Procs.mm_Mult_p(m, p_Copy(HH, r), r); // d^aplha lm_D(g) 382 H = nc_mm_Mult_pp(m, HH, r); // d^aplha lm_D(g) 383 384 poly K = p_Copy( p_GetCoeffRat(H, is, r), r); 399 H = nc_mm_Mult_pp(m, HH, r); // d^aplha lm_D(g) == h_g in the paper 400 401 poly K = p_Copy( p_GetCoeffRat(H, is, r), r); // k in the paper 385 402 Print("k: "); p_wrp(K,r); PrintS("\n"); 386 poly P = p_Copy( p_GetCoeffRat(p2, is, r), r); 403 poly P = p_Copy( p_GetCoeffRat(p2, is, r), r); // lc_D(p_2) == lc_D(f) 387 404 Print("p: "); p_wrp(P,r); PrintS("\n"); 388 405 … … 434 451 435 452 Print("d^a t_g: "); p_wrp(out,r); 436 Print S(" end reduction");437 out = p_Add_q(H, out, r); 453 Print(" end reduction\n"); 454 out = p_Add_q(H, out, r); // r_g + d^a t_g 438 455 p_Test(out,r); 439 out = p_Mult_q(PP, out, r); 440 441 out = p_Add_q(p2,out,r); // delete out, p2 456 out = p_Mult_q(PP, out, r); // c' (r_g + d^a t_g) 457 458 out = p_Add_q(p2,out,r); // delete out, p2; // the sum 442 459 p_Test(out,r); 443 460 if ( out!=NULL ) pContent(out); 
kernel/ratgring.h
r322662 r326434 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ratgring.h,v 1. 5 20080131 13:23:25 SingularExp $ */6 /* $Id: ratgring.h,v 1.6 20080807 21:15:56 levandov Exp $ */ 7 7 /* 8 8 * ABSTRACT additional defines etc for withplural … … 31 31 void p_ExpVectorDiffRat(poly pr, poly p1, poly p2, int ishift, ring r); 32 32 33 ideal ncGCD(poly p, poly q, ring r); 33 ideal ncGCD2(poly p, poly q, ring r); // real nc stuff 34 35 ideal ncGCD(poly p, poly q, ring r); // for p,q from a commutative ring 34 36 35 37 //poly nc_rat_CreateSpoly(poly p1, poly p2, poly spNoether, int ishift, ring r);
Note: See TracChangeset
for help on using the changeset viewer.