Changeset 43cbc0 in git
- Timestamp:
- Feb 23, 2009, 8:22:27 PM (14 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- e8e2b6921594abbde4a1dccae43bc5f6b73440d1
- Parents:
- 51542244f370752f7a57d84632cc1650dc8a4ed5
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gr_kstd2.cc
r515422 r43cbc0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: gr_kstd2.cc,v 1.2 8 2009-02-23 11:26:29 SingularExp $ */4 /* $Id: gr_kstd2.cc,v 1.29 2009-02-23 19:22:27 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: noncomm. alg. of Buchberger … … 1123 1123 // } 1124 1124 1125 strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing); 1125 1126 if( ! rIsRatGRing(currRing) ) 1127 { 1128 strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing); 1129 } 1130 else 1131 { 1132 /* rational case */ 1133 strat->P.p = nc_rat_CreateSpoly(strat->P.p1,strat->P.p2,currRing->real_var_start-1,currRing); 1134 } 1135 1126 1136 1127 1137 #ifdef PDEBUG -
kernel/gring.cc
r515422 r43cbc0 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: gring.cc,v 1.6 8 2008-07-26 14:28:03 motsakExp $9 * Version: $Id: gring.cc,v 1.69 2009-02-23 19:22:27 levandov Exp $ 10 10 *******************************************************************/ 11 11 … … 45 45 #include <ncSAMult.h> // for CMultiplier etc classes 46 46 #include <ncSAFormula.h> // for CFormulaPowerMultiplier and enum Enum_ncSAType 47 48 #ifdef HAVE_RATGRING 49 #include "ratgring.h" 50 #endif 47 51 48 52 … … 1896 1900 } 1897 1901 1898 poly m = p_Lcm(p1, p2, si_max(lCompP1, lCompP2), r); 1902 poly m; 1903 if ( ! rIsRatGRing(currRing)) 1904 { 1905 m = p_Lcm(p1, p2, si_max(lCompP1, lCompP2), r); 1906 } 1907 else 1908 { 1909 /* rational version */ 1910 m = p_LcmRat(p1, p2, si_max(lCompP1, lCompP2), r); 1911 } 1899 1912 1900 1913 // n_Delete(&p_GetCoeff(m, r), r); -
kernel/kutil.cc
r515422 r43cbc0 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.12 7 2009-02-23 13:32:35 SingularExp $ */4 /* $Id: kutil.cc,v 1.128 2009-02-23 19:22:27 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 53 53 #include "shiftgb.h" 54 54 #include "prCopy.h" 55 56 #ifdef HAVE_RATGRING 57 #include "ratgring.h" 58 #endif 55 59 56 60 #ifdef KDEBUG … … 1366 1370 */ 1367 1371 1368 1369 1372 void enterOnePairNormal (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR = -1) 1370 1373 { … … 1382 1385 Lp.lcm = pInit(); 1383 1386 1387 #ifndef HAVE_RATGRING 1384 1388 pLcm(p,strat->S[i],Lp.lcm); 1389 #elif defined(HAVE_RATGRING) 1390 // if (rIsRatGRing(currRing)) 1391 pLcmRat(p,strat->S[i],Lp.lcm, currRing->real_var_start); // int rat_shift 1392 #endif 1385 1393 pSetm(Lp.lcm); 1386 1394 … … 2298 2306 if (new_pair) 2299 2307 { 2308 #ifdef HAVE_RATGRING 2309 if (currRing->real_var_start>0) 2310 chainCritPart(h,ecart,strat); 2311 else 2312 #endif 2300 2313 strat->chainCrit(h,ecart,strat); 2301 2314 } … … 5549 5562 { 5550 5563 strat->chainCrit=chainCritPart; 5564 /* enterOnePairNormal get rational part in it */ 5551 5565 } 5552 5566 #endif … … 5565 5579 #ifdef HAVE_PLURAL 5566 5580 // and r is plural_ring 5581 // hence this holds for r a rational_plural_ring 5567 5582 if( rIsPluralRing(currRing) || (rIsSCA(currRing) && !strat->z2homog) ) 5568 5583 { //or it has non-quasi-comm type... later … … 7195 7210 if (new_pair) 7196 7211 { 7197 #ifdef HAVE_RATGRING7198 if (currRing->real_var_start>0)7199 chainCritPart(h,ecart,strat);7200 else7201 #endif7202 7212 strat->chainCrit(h,ecart,strat); 7203 7213 } -
kernel/ratgring.cc
r515422 r43cbc0 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: ratgring.cc,v 1.1 4 2009-02-21 19:30:56levandov Exp $9 * Version: $Id: ratgring.cc,v 1.15 2009-02-23 19:22:27 levandov Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 37 37 /* Don't do a pSetm here, otherwise hres/lres chockes */ 38 38 } 39 40 /*2 41 * returns the rational LCM of the head terms of a and b 42 * without coefficient!!! 43 */ 44 poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r) 45 { 46 poly m = // p_One( r); 47 p_Init(r); 48 49 const int pVariables = r->N; 50 51 // for (int i = pVariables; i>=r->real_var_start; i--) 52 for (int i = r->real_var_end; i>=r->real_var_start; i--) 53 { 54 const int lExpA = p_GetExp (a, i, r); 55 const int lExpB = p_GetExp (b, i, r); 56 57 p_SetExp (m, i, si_max(lExpA, lExpB), r); 58 } 59 60 p_SetComp (m, lCompM, r); 61 p_Setm(m,r); 62 n_New(&(p_GetCoeff(m, r)), r); 63 64 return(m); 65 }; 39 66 40 67 // void pLcmRat(poly a, poly b, poly m, poly pshift) -
kernel/ratgring.h
r515422 r43cbc0 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ratgring.h,v 1. 7 2009-02-21 19:30:56levandov Exp $ */6 /* $Id: ratgring.h,v 1.8 2009-02-23 19:22:27 levandov Exp $ */ 7 7 /* 8 8 * ABSTRACT additional defines etc for --with-plural … … 21 21 void pLcmRat(poly a, poly b, poly m, int rat_shift); 22 22 23 //void pLcmRat(poly a, poly b, poly m, poly pshift);23 poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r); 24 24 25 25 poly p_GetCoeffRat(poly p, int ishift, ring r);
Note: See TracChangeset
for help on using the changeset viewer.