Changeset 0a4a20d in git
- Timestamp:
- Nov 14, 2022, 4:32:07 PM (3 months ago)
- Branches:
- (u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
- Children:
- 08e898f2667529913af21341f62336e64bc3bc3c4df27e2988096e614ab54338dbdd2bb990a110e3
- Parents:
- 323776f85628804d361dfbd827431f866bf943d232c48290ade9c8b3bf376a8ed769638bcc54abdf
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2022-11-14 16:32:07+01:00
- git-committer:
- GitHub <noreply@github.com>2022-11-14 16:32:07+01:00
- Files:
-
- 2 added
- 67 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/GBEngine.dox
r323776f r0a4a20d 25 25 26 26 27 Some importa t data structures and classes:27 Some important data structures and classes: 28 28 - \ref skStrategy 29 29 - \ref sLObject -
kernel/GBEngine/f5lists.cc
r323776f r0a4a20d 99 99 //pWrite(temp->getPoly()); 100 100 //pWrite(p); 101 //Print("COM APRE: %d\n",pLmEqual(p,temp->getPoly()));101 //Print("COMPARE: %d\n",pLmEqual(p,temp->getPoly())); 102 102 if(1 == pLmEqual(p,temp->getPoly())) { 103 103 //Print("YES!\n"); … … 217 217 return newElement; 218 218 } 219 // insert new eleme ts to the list w.r.t. increasing labels219 // insert new elements to the list w.r.t. increasing labels 220 220 // only used for the S-polys to be reduced (TopReduction building new S-polys with higher label) 221 221 inline LNode* LNode::insertByLabel(poly t, int i, poly p, RuleOld* r) { … … 916 916 ==================================== 917 917 */ 918 // for initialization of CListOlds, last element alwa s has data=NULL and next=NULL918 // for initialization of CListOlds, last element always has data=NULL and next=NULL 919 919 CListOld::CListOld() { 920 920 first = NULL; -
kernel/GBEngine/f5lists.h
r323776f r0a4a20d 271 271 CNode* first; 272 272 public: 273 // for initialization of CListOlds, last element alwa s has data=NULL and next=NULL273 // for initialization of CListOlds, last element always has data=NULL and next=NULL 274 274 CListOld(); 275 275 CListOld(CPairOld* c); … … 314 314 private: 315 315 RNode* first; 316 // last alway has data=NULL and next=NULL, for initialization purposes used316 // last always has data=NULL and next=NULL, for initialization purposes used 317 317 RNode* last; 318 318 public: -
kernel/GBEngine/gr_kstd2.cc
r323776f r0a4a20d 301 301 } 302 302 } 303 // first try us al division303 // first try usual division 304 304 if (p_LmDivisibleBy(strat->S[j],(*h).p,currRing)) 305 305 { -
kernel/GBEngine/kChinese.cc
r323776f r0a4a20d 63 63 long *d=(long*)s; 64 64 s+=SIZEOF_LONG; 65 if (((*d)&1)==1) // imm idiate number65 if (((*d)&1)==1) // immediate number 66 66 { 67 67 *n=(number)(*d); -
kernel/GBEngine/khstd.cc
r323776f r0a4a20d 135 135 136 136 /* 137 This will be used for the local orderings in the case of the inhomogen ous ideals.137 This will be used for the local orderings in the case of the inhomogeneous ideals. 138 138 Assume f1,...,fs are already in the standard basis. Test if hilb(LM(f1),...,LM(fs),1) 139 is equal to the input ed one.139 is equal to the inputted one. 140 140 If no, do nothing. 141 141 If Yes, we know that all polys that we need are already in the standard basis -
kernel/GBEngine/kspoly.cc
r323776f r0a4a20d 150 150 #endif 151 151 152 // take care of coef bu isness152 // take care of coef business 153 153 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 154 154 { … … 284 284 #endif 285 285 286 // take care of coef bu isness286 // take care of coef business 287 287 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 288 288 { … … 427 427 428 428 number ct, an, bn; 429 // take care of coef bu isness429 // take care of coef business 430 430 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 431 431 { … … 687 687 #endif 688 688 689 // take care of coef bu isness689 // take care of coef business 690 690 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 691 691 { … … 901 901 #endif 902 902 903 // take care of coef bu isness903 // take care of coef business 904 904 if (! n_IsOne(pGetCoeff(p2), tailRing->cf)) 905 905 { … … 1007 1007 #endif 1008 1008 p_ExpVectorAddSub(sigMult,PR->GetLmCurrRing(),PW->GetLmCurrRing(),currRing); 1009 //I have also to set the leading coef icient for sigMult (in the case of rings)1009 //I have also to set the leading coefficient for sigMult (in the case of rings) 1010 1010 if(rField_is_Ring(currRing)) 1011 1011 { … … 1041 1041 if(sigMult != NULL) 1042 1042 PR->sig = pHead(pSub(PR->sig, sigMult)); 1043 //The sigs have the same lm, have to sub stract1043 //The sigs have the same lm, have to subtract 1044 1044 //It may happen that now the signature is 0 (drop) 1045 1045 if(PR->sig == NULL) … … 1148 1148 #endif 1149 1149 1150 // take care of coef bu isness1150 // take care of coef business 1151 1151 if(rField_is_Ring(currRing)) 1152 1152 { … … 1433 1433 /*************************************************************** 1434 1434 * 1435 * Auxil lary Routines1435 * Auxiliary Routines 1436 1436 * 1437 1437 * -
kernel/GBEngine/kstd1.cc
r323776f r0a4a20d 57 57 58 58 /* the list of all options which may be used by option and test */ 59 /* defin tion of ALL options: libpolys/misc/options.h */59 /* definition of ALL options: libpolys/misc/options.h */ 60 60 VAR BITSET validOpts=Sy_bit(0) 61 61 |Sy_bit(1) … … 135 135 if (intoT) 136 136 { 137 // need to do it exac ly like this: otherwise137 // need to do it exactly like this: otherwise 138 138 // we might get errors 139 139 LObject L= *h; … … 2130 2130 // do only a reduction of the leading term 2131 2131 //#define KSTD_NF_ECART 2 2132 // only local: re cude even with bad ecart2132 // only local: reduce even with bad ecart 2133 2133 poly p; 2134 2134 int i; … … 2234 2234 /*- release temp data------------------------------- -*/ 2235 2235 cleanT(strat); 2236 assume(strat->L==NULL); /*strat->L un sed */2236 assume(strat->L==NULL); /*strat->L unused */ 2237 2237 assume(strat->B==NULL); /*strat->B unused */ 2238 2238 omFreeSize((ADDRESS)strat->T,strat->tmax*sizeof(TObject)); … … 2275 2275 // do only a reduction of the leading term 2276 2276 //#define KSTD_NF_ECART 2 2277 // only local: re cude even with bad ecart2277 // only local: reduce even with bad ecart 2278 2278 poly p; 2279 2279 int i; … … 2387 2387 } 2388 2388 /*- release temp data------------------------------- -*/ 2389 assume(strat->L==NULL); /*strat->L un sed */2389 assume(strat->L==NULL); /*strat->L unused */ 2390 2390 assume(strat->B==NULL); /*strat->B unused */ 2391 2391 omFreeSize((ADDRESS)strat->T,strat->tmax*sizeof(TObject)); … … 3553 3553 #endif 3554 3554 3555 // redtailBBa against T for inhomogen ous input3555 // redtailBBa against T for inhomogeneous input 3556 3556 if (!TEST_OPT_OLDSTD) 3557 3557 withT = ! strat->homog; -
kernel/GBEngine/kstd1.h
r323776f r0a4a20d 18 18 // do only a reduction of the leading term 19 19 #define KSTD_NF_ECART 2 20 // only local: re cude even with bad ecart20 // only local: reduce even with bad ecart 21 21 #define KSTD_NF_NONORM 4 22 22 // only global: avoid normalization, return a multiply of NF -
kernel/GBEngine/kstd2.cc
r323776f r0a4a20d 660 660 /* unsigned long alpha_k = twoPow(leadRing->ch - k_ind2); 661 661 if (1 == 0 && alpha_k <= a) 662 { // Temporar ly disabled, reducing coefficients not compatible with std TODO Oliver662 { // Temporarily disabled, reducing coefficients not compatible with std TODO Oliver 663 663 zeroPoly = p_ISet((a / alpha_k)*alpha_k, tailRing); 664 664 for (int i = 1; i <= leadRing->N; i++) … … 702 702 int redRing_Z (LObject* h,kStrategy strat) 703 703 { 704 if (h->IsNull()) return 0; // spoly is zero (can only occur ewith zero divisors)704 if (h->IsNull()) return 0; // spoly is zero (can only occur with zero divisors) 705 705 if (strat->tl<0) return 1; 706 706 … … 861 861 { 862 862 if (strat->tl<0) return 1; 863 if (h->IsNull()) return 0; // spoly is zero (can only occur ewith zero divisors)863 if (h->IsNull()) return 0; // spoly is zero (can only occur with zero divisors) 864 864 865 865 int at/*,i*/; … … 2448 2448 strat->use_buckets = 1; 2449 2449 #endif 2450 // redtailBBa against T for inhomogen ous input2450 // redtailBBa against T for inhomogeneous input 2451 2451 if (!TEST_OPT_OLDSTD) 2452 2452 withT = ! strat->homog; … … 2942 2942 #endif 2943 2943 2944 // redtailBBa against T for inhomogen ous input2944 // redtailBBa against T for inhomogeneous input 2945 2945 // if (!TEST_OPT_OLDSTD) 2946 2946 // withT = ! strat->homog; … … 2964 2964 for(int i = 0;i<strat->sbaEnterS;i++) 2965 2965 { 2966 //Update: now the element is at the cor ect place2966 //Update: now the element is at the correct place 2967 2967 //i+1 because on the 0 position is the sigdrop element 2968 2968 enterT(strat->L[strat->Ll-(i)],strat); … … 3550 3550 if(strat->P.sig != NULL) 3551 3551 strat->sbaEnterS = pGetComp(strat->P.sig)-1; 3552 //else we already set it at the beg gining of the loop3552 //else we already set it at the beginning of the loop 3553 3553 #ifdef KDEBUG 3554 3554 memset(&(strat->P), 0, sizeof(strat->P)); … … 3632 3632 k = strat->Ll; 3633 3633 #if 1 3634 // 1 - adds just the unused ones, 0 - adds ever thing3634 // 1 - adds just the unused ones, 0 - adds everything 3635 3635 for(;k>=0 && (strat->L[k].p1 != NULL || strat->L[k].p2 != NULL);k--) 3636 3636 { … … 4418 4418 strat->use_buckets = 1; 4419 4419 #endif 4420 // redtailBBa against T for inhomogen ous input4420 // redtailBBa against T for inhomogeneous input 4421 4421 // if (!TEST_OPT_OLDSTD) 4422 4422 // withT = ! strat->homog; -
kernel/GBEngine/kutil.cc
r323776f r0a4a20d 2248 2248 *(this canceling should be done here because 2249 2249 *the case lcm(s,p) == lcm(s,r) is not covered in chainCrit) 2250 *the first case is hand eled in chainCrit2250 *the first case is handled in chainCrit 2251 2251 */ 2252 2252 if (Lp.lcm!=NULL) pLmFree(Lp.lcm); … … 2479 2479 *(this canceling should be done here because 2480 2480 *the case lcm(s,p) == lcm(s,r) is not covered in chainCrit) 2481 *the first case is hand eled in chainCrit2481 *the first case is handled in chainCrit 2482 2482 */ 2483 2483 if (Lp.lcm!=NULL) pLmFree(Lp.lcm); … … 2933 2933 if(pSigMult != NULL && sSigMult != NULL && p_LmCmp(pSigMult,sSigMult,currRing) == 0) 2934 2934 { 2935 //Same lm, have to sub stract2935 //Same lm, have to subtract 2936 2936 Lp.sig = p_Sub(pCopy(pSigMult),pCopy(sSigMult),currRing); 2937 2937 } … … 4692 4692 else 4693 4693 */ 4694 // #endif // ??? Why was the following cancel ation disabled for non-commutative rings?4694 // #endif // ??? Why was the following cancellation disabled for non-commutative rings? 4695 4695 { 4696 4696 j=pos; … … 6100 6100 * to the ordering-procedure pLmCmp,totaldegree,coefficient 6101 6101 * For the same totaldegree, original pairs (from F) will 6102 * be put at the end and smalles coefficents6102 * be put at the end and smallest coefficients 6103 6103 */ 6104 6104 int posInL11Ring (const LSet set, const int length, … … 8308 8308 // diff should be zero, but sometimes also the initial generating 8309 8309 // elements of the input ideal reduce to zero. then there is an 8310 // index-gap between the signatures. for these in between signatures we8310 // index-gap between the signatures. for these in-between signatures we 8311 8311 // can safely set syzIdx[j] = 0 as no such element will be ever computed 8312 8312 // in the following. … … 8353 8353 // diff should be zero, but sometimes also the initial generating 8354 8354 // elements of the input ideal reduce to zero. then there is an 8355 // index-gap between the signatures. for these in between signatures we8355 // index-gap between the signatures. for these in-between signatures we 8356 8356 // can safely set syzIdx[j] = 0 as no such element will be ever computed 8357 8357 // in the following. … … 9334 9334 /*- save result -*/ 9335 9335 strat->S[atS] = p.p; 9336 strat->sig[atS] = p.sig; // TODO: get th scorrect signature in here!9336 strat->sig[atS] = p.sig; // TODO: get the correct signature in here! 9337 9337 if (strat->honey) strat->ecartS[atS] = p.ecart; 9338 9338 if (p.sev == 0) … … 9477 9477 assume(strat->tailRing == p.tailRing); 9478 9478 // redMoraNF complains about this -- but, we don't really 9479 // nee ed this so far9479 // need this so far 9480 9480 assume(p.pLength == 0 || pLength(p.p) == p.pLength || rIsSyzIndexRing(currRing)); // modulo syzring 9481 9481 assume(!strat->homog || (p.FDeg == p.pFDeg())); … … 9565 9565 assume(strat->tailRing == p.tailRing); 9566 9566 // redMoraNF complains about this -- but, we don't really 9567 // nee ed this so far9567 // need this so far 9568 9568 assume(p.pLength == 0 || (int)pLength(p.p) == p.pLength || rIsSyzIndexRing(currRing)); // modulo syzring 9569 9569 assume(p.FDeg == p.pFDeg()); … … 9741 9741 9742 9742 //if the ordering is local, then hilb criterion 9743 //can be used also if the ideal is not homogen ous9743 //can be used also if the ideal is not homogeneous 9744 9744 if((rHasLocalOrMixedOrdering(currRing)) && (rHasMixedOrdering(currRing)==FALSE)) 9745 9745 { … … 9785 9785 if (TEST_OPT_NOT_SUGAR) strat->honey = FALSE; 9786 9786 strat->pairtest = NULL; 9787 /* alway use tailreduction, except:9787 /* always use tailreduction, except: 9788 9788 * - in local rings, - in lex order case, -in ring over extensions */ 9789 9789 strat->noTailReduction = !TEST_OPT_REDTAIL; … … 9859 9859 if (TEST_OPT_NOT_SUGAR) strat->honey = FALSE; 9860 9860 strat->pairtest = NULL; 9861 /* alway use tailreduction, except:9861 /* always use tailreduction, except: 9862 9862 * - in local rings, - in lex order case, -in ring over extensions */ 9863 9863 strat->noTailReduction = !TEST_OPT_REDTAIL; … … 12918 12918 *(this canceling should be done here because 12919 12919 *the case lcm(s,p) == lcm(s,r) is not covered in chainCrit) 12920 *the first case is hand eled in chainCrit12920 *the first case is handled in chainCrit 12921 12921 */ 12922 12922 if (Lp.lcm!=NULL) pLmFree(Lp.lcm); … … 13368 13368 || (pGetComp(strat->S[j])==0)) 13369 13369 { 13370 assume(isFromQ == 0); // this case is not hand eled here and should also never happen13370 assume(isFromQ == 0); // this case is not handled here and should also never happen 13371 13371 poly s = strat->S[j]; 13372 13372 if (strat->fromQ != NULL && strat->fromQ[j]) -
kernel/GBEngine/kutil.h
r323776f r0a4a20d 768 768 // Reduces PR at Current->next with PW 769 769 // Assumes PR != NULL, Current contained in PR 770 // Current->next != NULL, LM(PW) d evides LM(Current->next)770 // Current->next != NULL, LM(PW) divides LM(Current->next) 771 771 // Changes: PR 772 772 // Const: PW -
kernel/GBEngine/ratgring.cc
r323776f r0a4a20d 497 497 poly H = NULL; 498 498 HH = p_HeadRat(p1,is,r); //p_Copy(p_HeadRat(p1,is,r),r); // lm_D(g) 499 // H = r->nc->p_Procs.mm_Mult_p(m, p_Copy(HH, r), r); // d^a plha lm_D(g)500 H = nc_mm_Mult_p(m, HH, r); // d^a plha lm_D(g) == h_g in the paper499 // H = r->nc->p_Procs.mm_Mult_p(m, p_Copy(HH, r), r); // d^alpha lm_D(g) 500 H = nc_mm_Mult_p(m, HH, r); // d^alpha lm_D(g) == h_g in the paper 501 501 502 502 poly K = p_GetCoeffRat(H, is, r); //p_Copy( p_GetCoeffRat(H, is, r), r); // k in the paper … … 538 538 #endif 539 539 540 // out = r->nc->p_Procs.mm_Mult_p(m, out, r); // d^a plha t_g541 out = nc_mm_Mult_p(m, out, r); // d^a plha t_g540 // out = r->nc->p_Procs.mm_Mult_p(m, out, r); // d^alpha t_g 541 out = nc_mm_Mult_p(m, out, r); // d^alpha t_g 542 542 p_Delete(&m,r); 543 543 -
kernel/GBEngine/sca.cc
r323776f r0a4a20d 458 458 #endif 459 459 460 // redtailBBa against T for inhomogen ous input460 // redtailBBa against T for inhomogeneous input 461 461 if (!TEST_OPT_OLDSTD) 462 462 withT = ! strat->homog; … … 484 484 // due to std( SB, p). 485 485 // Note that after initBuchMora :: initSSpecial all these additional 486 // elements are in S and T (and some pairs are in L, which also has no initial l486 // elements are in S and T (and some pairs are in L, which also has no initial 487 487 // elements!!!) 488 488 if(TEST_OPT_SB_1) -
kernel/GBEngine/syz.cc
r323776f r0a4a20d 295 295 while ((index<length) && (res[index]!=NULL)) 296 296 { 297 /*---we take out dependen delements from syz---------------------*/297 /*---we take out dependent elements from syz---------------------*/ 298 298 if (res[index+1]!=NULL) 299 299 { -
kernel/GBEngine/syz.h
r323776f r0a4a20d 22 22 poly lcm; /*- the lcm of p1,p2 -*/ 23 23 poly syz; /*- the syzygy associated to p1,p2 -*/ 24 int ind1,ind2; /*- the ind eces of p1,p2 -*/24 int ind1,ind2; /*- the indices of p1,p2 -*/ 25 25 poly isNotMinimal; 26 26 int syzind; -
kernel/GBEngine/syz1.cc
r323776f r0a4a20d 514 514 same_comp = SYZ_SHIFT_BASE; 515 515 516 // test whet er we have enough space for new shifted component516 // test whether we have enough space for new shifted component 517 517 if ((LONG_MAX - same_comp) <= shind[ie-1]) 518 518 { … … 1807 1807 return result; /// Don't change the syzstr??? 1808 1808 1809 // TODO: cleanup th ses!1809 // TODO: cleanup these! 1810 1810 if( fullres != NULL && syzstr->fullres == NULL ) 1811 1811 syzstr->fullres = fullres; … … 2270 2270 /*2 2271 2271 * re-computes the order of pairs during the algorithm 2272 * this ensures to proce dewith a triangular matrix2272 * this ensures to proceed with a triangular matrix 2273 2273 */ 2274 2274 static intvec * syOrdPairs(SSet sPairs, int length) … … 2380 2380 rChangeCurrRing(origR); 2381 2381 // Thomas: now make sure that all data which you need is pFetchCopied 2382 // maybe inco porate it into syReorder ??2382 // maybe incorporate it into syReorder ?? 2383 2383 } 2384 2384 tres = syReorder(tres,syzstr->length,syzstr,FALSE,syzstr->res); -
kernel/GBEngine/syz2.cc
r323776f r0a4a20d 898 898 /*3 899 899 * reorders the result (stored in orderedRes) according 900 * to the seq ence given by res900 * to the sequence given by res 901 901 */ 902 902 static void syReOrdResult_Hilb(syStrategy syzstr,int maxindex,int maxdeg) -
kernel/GBEngine/syz3.cc
r323776f r0a4a20d 51 51 /*3 52 52 * assumes the ideals old_ideal and new_ideal to be homogeneous 53 * tests w ether the new_ideal is a regular extension of the old_ideal53 * tests whether the new_ideal is a regular extension of the old_ideal 54 54 */ 55 55 static BOOLEAN syIsRegular(ideal old_ideal,ideal new_ideal,int deg) … … 684 684 if (index==0) 685 685 { 686 /*--- tests w ether a generator must be replaced (lt(f1)|lt(f2)!)--*/686 /*--- tests whether a generator must be replaced (lt(f1)|lt(f2)!)--*/ 687 687 if (p_FDeg(tso.p1,currRing)==p_FDeg(tso.lcm,currRing)) 688 688 toReplace = tso.ind1+1; … … 691 691 } 692 692 #ifdef EXPERIMENT3 693 /*--- tests w ether the product criterion applies --------------*/693 /*--- tests whether the product criterion applies --------------*/ 694 694 if ((index==0) && (old_generators->rank==1) && 695 695 (p_FDeg(tso.p1,currRing)+p_FDeg(tso.p2,currRing)==tso.order)) … … 852 852 if (toReplace) 853 853 { 854 /*-- replaces the generator if nec cesary ------------------*/854 /*-- replaces the generator if necessary ------------------*/ 855 855 pDelete(&old_generators->m[toReplace-1]); 856 856 pDelete(&old_repr->m[toReplace-1]); … … 1052 1052 1053 1053 /*3 1054 * updates the pairs in the higher modules1054 * updates the pairs in the higher modules 1055 1055 */ 1056 1056 static void updatePairsHIndex(SSet *resPairs,int *l_pairs,syStrategy /*syzstr*/, … … 1408 1408 * we proceed the generators of the next module; 1409 1409 * they are stored in add_generators and add_repr; 1410 * if the normal form of a new gen rators w.r.t. add_generators has1410 * if the normal form of a new generators w.r.t. add_generators has 1411 1411 * pGetComp<crit_comp it is skipped from the reduction; 1412 1412 * new_generators and new_repr (which are empty) stores the result of the … … 1523 1523 if ((next_place_add>next_new_el) || (next_deg<0)) //there are new generators or pairs 1524 1524 { 1525 /*-reducing and generating pairs until lthe degree of the next generators-*/1525 /*-reducing and generating pairs until the degree of the next generators-*/ 1526 1526 pairs_left = TRUE; 1527 1527 while (pairs_left && ((next_deg<0) || (red_deg<= next_deg))) … … 1746 1746 PrintS("Add new generators:\n"); 1747 1747 idPrint(new_generators); 1748 PrintS("with representa ions:\n");1748 PrintS("with representations:\n"); 1749 1749 idPrint(new_repr); 1750 1750 #endif -
kernel/GBEngine/syz4.cc
r323776f r0a4a20d 781 781 * subtree attached to the node which represents this term, see reference. 782 782 * 783 * If use_tensor_trick == true, the current module is mod fied after each783 * If use_tensor_trick == true, the current module is modified after each 784 784 * lifting step in the resolution: any term which contains a variable which 785 785 * does not appear among the (induced) leading terms is deleted. Note that the -
kernel/GBEngine/test.cc
r323776f r0a4a20d 449 449 poly p1=pISet(1); 450 450 451 // create t the polynomial 2*x^3*z^2451 // create the polynomial 2*x^3*z^2 452 452 poly p2=p_ISet(2,R); 453 453 pSetExp(p2,1,3); -
kernel/GBEngine/tgb.cc
r323776f r0a4a20d 1236 1236 } 1237 1237 1238 //can also try dependen dsearch1238 //can also try dependent search 1239 1239 omFree (i_con); 1240 1240 omFree (j_con); … … 1716 1716 shorten_tails (c, c->S->m[c->n - 1]); 1717 1717 } 1718 //you should really update c->lengths, c->strat->lenS, and the o der of polys in strat if you sort after lengths1718 //you should really update c->lengths, c->strat->lenS, and the order of polys in strat if you sort after lengths 1719 1719 1720 1720 //for(i=c->strat->sl; i>0;i--) -
kernel/GBEngine/tgb_internal.h
r323776f r0a4a20d 332 332 { 333 333 public: 334 /// we assume hat all occuring red_objects have same lm, and all334 /// we assume that all occurring red_objects have same lm, and all 335 335 /// occ. lm's in r[l...u] are the same, only reductor does not occur 336 336 virtual void reduce(red_object* r, int l, int u); -
kernel/Makefile.am
r323776f r0a4a20d 43 43 ${builddir}/libkernelCommon.la 44 44 45 ### TODO: the following has to be ad dapted...45 ### TODO: the following has to be adapted... 46 46 TESTS_ENVIRONMENT = SINGULARPATH='${abs_top_builddir}/libpolys/polys/.libs:${abs_top_builddir}/factory/gftables' 47 47 TESTS_ENVIRONMENT += SINGULAR_ROOT_DIR='${abs_top_builddir}' -
kernel/combinatorics/hilb.cc
r323776f r0a4a20d 63 63 */ 64 64 65 //adds the new polynomial at the cor esponding position65 //adds the new polynomial at the corresponding position 66 66 //and simplifies the ideal, destroys p 67 67 static void SortByDeg_p(ideal I, poly p) … … 1164 1164 { 1165 1165 /* 1166 * shifts the vari bles of monomial p in the i^th layer,1166 * shifts the variables of monomial p in the i^th layer, 1167 1167 * p remains unchanged, 1168 1168 * creates new poly and returns it for the colon ideal … … 1197 1197 { 1198 1198 /* 1199 * deletes the variables up to i^th layer of monomial w1199 * deletes the variables up to i^th layer of monomial w 1200 1200 * w remains unchanged 1201 1201 * creates new poly and returns it for the colon ideal … … 1829 1829 } 1830 1830 poly hilbert_series(ideal A, const ring src, const intvec* wdegree, const ring Qt) 1831 // acco ding to:1831 // according to: 1832 1832 // Algorithm 2.6 of 1833 1833 // Dave Bayer, Mike Stillman - Computation of Hilbert Function -
kernel/combinatorics/test.cc
r323776f r0a4a20d 316 316 poly p1=pISet(1); 317 317 318 // create t the polynomial 2*x^3*z^2318 // create the polynomial 2*x^3*z^2 319 319 poly p2=p_ISet(2,R); 320 320 pSetExp(p2,1,3); … … 352 352 feInitResources(argv[0]); 353 353 354 StringSetS("res sources in use (as reported by feStringAppendResources(0):\n");354 StringSetS("resources in use (as reported by feStringAppendResources(0):\n"); 355 355 feStringAppendResources(0); 356 356 -
kernel/fglm/fglmcomb.cc
r323776f r0a4a20d 164 164 165 165 int * weights = NULL; 166 int * length es = NULL;166 int * lengths = NULL; 167 167 int * order = NULL; 168 168 … … 174 174 STICKYPROT2( "%i monoms\n", numMonoms ); 175 175 176 // All coate Memory and initialize sets176 // Allocate Memory and initialize sets 177 177 m= (polyset)omAlloc( numMonoms * sizeof( poly ) ); 178 178 poly temp= monset; … … 216 216 } 217 217 STICKYPROT( "\n" ); 218 length es= (int *)omAlloc( numMonoms * sizeof( int ) );218 lengths= (int *)omAlloc( numMonoms * sizeof( int ) ); 219 219 order= (int *)omAlloc( numMonoms * sizeof( int ) ); 220 220 … … 307 307 STICKYPROT( "sizes: " ); 308 308 for ( k= 0; k < numMonoms; k++ ) { 309 length es[k]= v[k].numNonZeroElems();310 STICKYPROT2( "%i ", length es[k] );309 lengths[k]= v[k].numNonZeroElems(); 310 STICKYPROT2( "%i ", lengths[k] ); 311 311 } 312 312 STICKYPROT( "\n" ); … … 316 316 int best = 0; 317 317 for ( k= numMonoms - 1; k >= 0; k-- ) { 318 if ( length es[k] > 0 ) {318 if ( lengths[k] > 0 ) { 319 319 if ( best == 0 ) { 320 320 best= k+1; 321 321 } 322 322 else { 323 if ( length es[k] < lengthes[best-1] ) {323 if ( lengths[k] < lengths[best-1] ) { 324 324 best= k+1; 325 325 } … … 327 327 } 328 328 } 329 length es[best-1]= 0;329 lengths[best-1]= 0; 330 330 order[act]= best-1; 331 331 STICKYPROT2( " (%i) ", best ); … … 382 382 } 383 383 // Free Memory 384 omFreeSize( (ADDRESS)length es, numMonoms * sizeof( int ) );384 omFreeSize( (ADDRESS)lengths, numMonoms * sizeof( int ) ); 385 385 omFreeSize( (ADDRESS)order, numMonoms * sizeof( int ) ); 386 386 // for ( k= 0; k < numMonoms; k++ ) -
kernel/fglm/fglmgauss.cc
r323776f r0a4a20d 6 6 /* 7 7 * ABSTRACT - class gaussReducer. Used in fglmzero.cc and fglmhom.cc 8 * to find linear depende cies of fglmVectors.8 * to find linear dependencies of fglmVectors. 9 9 */ 10 10 -
kernel/fglm/fglmhom.cc
r323776f r0a4a20d 36 36 #include "factory/templates/ftmpl_list.h" 37 37 38 // obachman: Got rid of f those "redefiende messages by includeing fglm.h38 // obachman: Got rid of those "redefined" messages by including fglm.h 39 39 #include "fglm.h" 40 40 #if 0 … … 223 223 for ( s= dat.numMonoms - 1; s >= 0; s-- ) { 224 224 // dat.monlist[s].mon.sm= pPermPoly( dat.monlist[s].mon.dm, vperm, currRing->N, NULL, 0 ); 225 // obachman: changed the fol owing to reflect the new calling interface of225 // obachman: changed the following to reflect the new calling interface of 226 226 // pPermPoly -- Tim please check whether this is correct! 227 227 dat.monlist[s].mon.sm= pPermPoly( dat.monlist[s].mon.dm, vperm, oldRing, NULL, 0 ); -
kernel/fglm/fglmvec.cc
r323776f r0a4a20d 222 222 int vsize = v.size (); 223 223 number term1, term2; 224 fglmASSERT (vsize <= rep->size (), "v has to be smaller o der equal");224 fglmASSERT (vsize <= rep->size (), "v has to be smaller or equal"); 225 225 if(rep->isUnique ()) 226 226 { -
kernel/fglm/fglmzero.cc
r323776f r0a4a20d 572 572 } 573 573 574 // Searches through the border for a monom oial bm which devides m and returns574 // Searches through the border for a monomial bm which divides m and returns 575 575 // its normalform in vector representation. 576 576 // var contains the number of the variable v, s.t. bm = m * v … … 662 662 // returns them in "l". 663 663 // The ideal has to be zero-dimensional and reduced and has to be a 664 // real subset of the polynom al ring.664 // real subset of the polynomial ring. 665 665 // In any case it has to be zero-dimensional and minimal (check this 666 666 // via fglmIdealcheck). Any minimal but not reduced ideal is detected. … … 1079 1079 // some elements of v are zeroed in data.gaussreduce(). Which 1080 1080 // ones and how this was done is stored in p. 1081 // originalV contain es the unchanged v, which is later inserted1081 // originalV contains the unchanged v, which is later inserted 1082 1082 // into the working list (via data.updateCandidates(). 1083 1083 fglmVector v = l.multiply( candidate.v, candidate.var ); … … 1087 1087 data.gaussreduce( v, p, pdenom ); 1088 1088 if ( v.isZero() ) { 1089 // Now v is linear dependen dto the already found basis elements.1090 // This means that v (r sp. candidate.monom) is the leading1089 // Now v is linear dependent to the already found basis elements. 1090 // This means that v (resp. candidate.monom) is the leading 1091 1091 // monomial of the next groebner-basis polynomial. 1092 1092 data.newGroebnerPoly( p, candidate.monom ); … … 1189 1189 } 1190 1190 1191 // for a descri tption of the parameters see fglm.h1191 // for a description of the parameters see fglm.h 1192 1192 BOOLEAN 1193 1193 fglmzero( ring sourceRing, ideal & sourceIdeal, ring destRing, ideal & destIdeal, BOOLEAN switchBack, BOOLEAN deleteIdeal ) -
kernel/fglm/test.cc
r323776f r0a4a20d 313 313 poly p1=pISet(1); 314 314 315 // create t the polynomial 2*x^3*z^2315 // create the polynomial 2*x^3*z^2 316 316 poly p2=p_ISet(2,R); 317 317 pSetExp(p2,1,3); -
kernel/groebner_walk/test.cc
r323776f r0a4a20d 314 314 poly p1=pISet(1); 315 315 316 // create t the polynomial 2*x^3*z^2316 // create the polynomial 2*x^3*z^2 317 317 poly p2=p_ISet(2,R); 318 318 pSetExp(p2,1,3); -
kernel/groebner_walk/walkMain.cc
r323776f r0a4a20d 307 307 308 308 309 //unperturbedStartVectorStrategy IS NOW NOT AL LWAYS AS DEFAULT SET309 //unperturbedStartVectorStrategy IS NOW NOT ALWAYS AS DEFAULT SET 310 310 //TO TRUE BUT IS INPUT FROM fractalWalk64 311 311 WalkState firstFractalWalkStep64(ideal & G,int64vec* & currw64, … … 316 316 if(unperturbedStartVectorStrategy){ 317 317 return(unperturbedFirstStep64(G,currw64,destRing)); 318 //here G is updated since its ad ress is given as argument318 //here G is updated since its address is given as argument 319 319 } 320 320 … … 548 548 state=fractalRec64(Gw,sigma,destMat,level+1,step); 549 549 550 //The resulting GB is Gw since its ad ress is given as argument.550 //The resulting GB is Gw since its address is given as argument. 551 551 ideal recG=Gw; 552 552 ring temp=currRing; -
kernel/groebner_walk/walkSupport.cc
r323776f r0a4a20d 739 739 //leadExp 740 740 /////////////////////////////////////////////////////////////////// 741 //Description: returns an intvec contain g the exponet vector of p741 //Description: returns an intvec containing the exponent vector of p 742 742 /////////////////////////////////////////////////////////////////// 743 743 //Uses: sizeof,omAlloc,omFree … … 971 971 //matIdLift 972 972 /////////////////////////////////////////////////////////////////// 973 //Description: yields the same res lut as lift in Singular973 //Description: yields the same result as lift in Singular 974 974 /////////////////////////////////////////////////////////////////// 975 975 //Uses: idLift,idModule2formatedMatrix -
kernel/ideals.cc
r323776f r0a4a20d 559 559 rChangeCurrRing(orig_ring); 560 560 561 /* interpret eresult ----------------------------------------*/561 /* interpret result ----------------------------------------*/ 562 562 result = idInit(IDELEMS(tempstd),maxrk); 563 563 k = 0; … … 2164 2164 2165 2165 /*3 2166 *handles for some ideal operations the ring/syzcomp manag ment2166 *handles for some ideal operations the ring/syzcomp management 2167 2167 *returns all syzygies (componentwise-)shifted by -syzcomp 2168 2168 *or -syzcomp-1 (in case of ideals as input) … … 2583 2583 /*2 2584 2584 *decomposes the monom in a part of coefficients described by the 2585 *complement of how and a monom in variables occur ing in how, the2585 *complement of how and a monom in variables occurring in how, the 2586 2586 *index of which in kbase is returned as integer pos (-1 if it don't 2587 2587 *exists) -
kernel/ideals.h
r323776f r0a4a20d 115 115 116 116 117 // GB algorithm for syz computa ions:117 // GB algorithm for syz computations: 118 118 enum GbVariant 119 119 { -
kernel/linear_algebra/Cache.h
r323776f r0a4a20d 255 255 * If so, the method returns true; false otherwise. 256 256 * In order to make Cache::getValue (const KeyClass&) const 257 * work properly, the user is strongly advi ced to always check key257 * work properly, the user is strongly advised to always check key 258 258 * containment by means of Cache::hasKey (const KeyClass&) const. 259 259 * (The implementation at hand ensures that invoking hasKey and … … 292 292 * newly inserted pair (key --> value).<br> 293 293 * Because of that undesirable but possible effect, the method returns 294 * whether the pair is actually contained in the cache after invo kation of294 * whether the pair is actually contained in the cache after invocation of 295 295 * Cache::put (const KeyClass&, const ValueClass&). 296 296 * @param key an instance of KeyClass -
kernel/linear_algebra/Minor.cc
r323776f r0a4a20d 757 757 }; 758 758 _columnKey[newBitBlockIndex] = anInt; 759 /* ...and we delete all entries in _columnKey[i] fo 759 /* ...and we delete all entries in _columnKey[i] for 760 760 0 <= i < newBitBlockIndex */ 761 761 for (int i = 0; i < newBitBlockIndex; i++) -
kernel/linear_algebra/Minor.h
r323776f r0a4a20d 59 59 * the number of ints (i.e. 32-bit-numbers) we need to encode the set of 60 60 * rows; 61 * If the hig est row index is 70, we need 3 blocks of 32 bits to also61 * If the highest row index is 70, we need 3 blocks of 32 bits to also 62 62 * encode the 70th bit. 63 63 */ … … 67 67 * the number of ints (i.e. 32-bit-numbers) we need to encode the set of 68 68 * columns; 69 * If the hig est column index is 70, we need 3 blocks of 32 bits to also69 * If the highest column index is 70, we need 3 blocks of 32 bits to also 70 70 * encode the 70th bit. 71 71 */ … … 456 456 * on MinorValues has an impact on the caching behaviour in a given cache: 457 457 * Greater MinorValues will be cached longer than lower ones.<br> 458 * More explicit ely, this means: Make the return value of this method458 * More explicitly, this means: Make the return value of this method 459 459 * greater, and the given MinorValue will be cached longer when caching 460 460 * strategy 1 is deployed.<br> … … 472 472 * in a given cache: Greater MinorValues will be cached longer than lower 473 473 * ones.<br> 474 * More explicit ely, this means: Make the return value of this method474 * More explicitly, this means: Make the return value of this method 475 475 * greater, and the given MinorValue will be cached longer when caching 476 476 * strategy 1 is deployed.<br> … … 490 490 * in a given cache: Greater MinorValues will be cached longer than lower 491 491 * ones.<br> 492 * More explicit ely, this means: Make the return value of this method492 * More explicitly, this means: Make the return value of this method 493 493 * greater, and the given MinorValue will be cached longer when caching 494 494 * strategy 1 is deployed.<br> … … 507 507 * in a given cache: Greater MinorValues will be cached longer than lower 508 508 * ones.<br> 509 * More explicit ely, this means: Make the return value of this method509 * More explicitly, this means: Make the return value of this method 510 510 * greater, and the given MinorValue will be cached longer when caching 511 511 * strategy 1 is deployed.<br> … … 524 524 * in a given cache: Greater MinorValues will be cached longer than lower 525 525 * ones.<br> 526 * More explicit ely, this means: Make the return value of this method526 * More explicitly, this means: Make the return value of this method 527 527 * greater, and the given MinorValue will be cached longer when caching 528 528 * strategy 1 is deployed.<br> … … 663 663 * of the underlying cache: Greater MinorValues will be cached longer than 664 664 * lower ones.<br> 665 * More explicit ely, this means: Make the return value of this method665 * More explicitly, this means: Make the return value of this method 666 666 * greater, and the given MinorValue will be cached longer.<br> 667 667 * Internally, this method will call one of several implementations, -
kernel/linear_algebra/MinorProcessor.cc
r323776f r0a4a20d 616 616 rowPermutation[r] = j; 617 617 /* Now we know that tempMatrix[rowPermutation[r] * k + r] is not zero. 618 But careful l; we have to negate the sign, as there is always an odd618 But careful; we have to negate the sign, as there is always an odd 619 619 number of row transpositions to swap two given rows of a matrix. */ 620 620 sign = -sign; … … 1471 1471 rowPermutation[r] = j; 1472 1472 /* Now we know that tempMatrix[rowPermutation[r] * k + r] is not zero. 1473 But careful l; we have to negate the sign, as there is always an odd1473 But careful; we have to negate the sign, as there is always an odd 1474 1474 number of row transpositions to swap two given rows of a matrix. */ 1475 1475 sign = -sign; -
kernel/linear_algebra/MinorProcessor.h
r323776f r0a4a20d 111 111 * \c k columns inside a pre-defined submatrix of a pre-defined matrix.<br> 112 112 * The method will set \c _rowKey and \c columnKey to represent the 113 * next poss bile subsets of \c k rows and columns inside the submatrix113 * next possible subsets of \c k rows and columns inside the submatrix 114 114 * determined by \c _globalRowKey and \c _globalColumnKey.<br> 115 115 * When first called, this method will just shift \c _rowKey and … … 129 129 * the underlying matrix; 130 130 * \c _container will be used to fix a submatrix (e.g. 40 x 50) of a 131 * larger matrix (e.g. 70 x 100). This is useful lwhen we would like to131 * larger matrix (e.g. 70 x 100). This is useful when we would like to 132 132 * compute all minors of a given size (e.g. 4 x 4) inside such a 133 133 * pre-defined submatrix. … … 323 323 * characteristic is non-zero, all results will be computed modulo this 324 324 * characteristic. 325 * @param k the number of rows and columns in the minor to be com uted325 * @param k the number of rows and columns in the minor to be computed 326 326 * @param mk the representation of rows and columns of the minor to be 327 * com uted327 * computed 328 328 * @param multipleMinors decides whether we compute just one or all minors 329 329 * of a specified size … … 355 355 * characteristic is non-zero, all results will be computed modulo this 356 356 * characteristic. 357 * @param k the number of rows and columns in the minor to be com uted357 * @param k the number of rows and columns in the minor to be computed 358 358 * @param mk the representation of rows and columns of the minor to be 359 * com uted359 * computed 360 360 * @param characteristic 0 or the characteristic of the underlying 361 361 * coefficient ring/field … … 383 383 * given characteristic is non-zero, all results will be computed modulo 384 384 * this characteristic. 385 * @param k the number of rows and columns in the minor to be com uted385 * @param k the number of rows and columns in the minor to be computed 386 386 * @param mk the representation of rows and columns of the minor to be 387 387 * computed … … 582 582 * If an ideal is given, it is assumed to be a standard basis. In this case, 583 583 * all results will be reduced w.r.t. to this basis. 584 * @param k the number of rows and columns in the minor to be com uted584 * @param k the number of rows and columns in the minor to be computed 585 585 * @param mk the representation of rows and columns of the minor to be 586 * com uted586 * computed 587 587 * @param multipleMinors decides whether we compute just one or all minors 588 588 * of a specified size … … 608 608 * If an ideal is given, it is assumed to be a standard basis. In this case, 609 609 * all results will be reduced w.r.t. to this basis. 610 * @param k the number of rows and columns in the minor to be com uted610 * @param k the number of rows and columns in the minor to be computed 611 611 * @param mk the representation of rows and columns of the minor to be 612 * com uted612 * computed 613 613 * @param iSB NULL or a standard basis 614 614 * @return an instance of MinorValue representing the value of the … … 627 627 * If an ideal is given, it is assumed to be a standard basis. In this case, 628 628 * all results will be reduced w.r.t. to this basis. 629 * @param k the number of rows and columns in the minor to be com uted629 * @param k the number of rows and columns in the minor to be computed 630 630 * @param mk the representation of rows and columns of the minor to be 631 * com uted631 * computed 632 632 * @param iSB NULL or a standard basis 633 633 * @return an instance of MinorValue representing the value of the -
kernel/linear_algebra/interpolation.cc
r323776f r0a4a20d 129 129 STATIC_VAR bool denom_divisible; // common denominator is divisible by p (not used for modp) 130 130 131 STATIC_VAR poly comparizon_p1; //polynomials used to do compari zons by Singular131 STATIC_VAR poly comparizon_p1; //polynomials used to do comparisons by Singular 132 132 STATIC_VAR poly comparizon_p2; 133 133 … … 974 974 975 975 976 static void NewGenerator (mono_type mon) // new generator in modp comp found, shoul be stored on the list976 static void NewGenerator (mono_type mon) // new generator in modp comp found, should be stored on the list 977 977 { 978 978 generator_entry *cur_ptr; … … 1014 1014 } 1015 1015 #if 0 /* only debbuging */ 1016 void PresentGenerator (int i) // only for debug ing, writes a generator in its form in program1016 void PresentGenerator (int i) // only for debugging, writes a generator in its form in program 1017 1017 { 1018 1018 int j; … … 1164 1164 } 1165 1165 1166 static void Discard () // some unlucky prime occur es1166 static void Discard () // some unlucky prime occurs 1167 1167 { 1168 1168 modp_result_entry *temp; -
kernel/linear_algebra/linearAlgebra.cc
r323776f r0a4a20d 39 39 * numbers (, see numbers.h): nSize(n) provides a measure for the 40 40 * complexity of n. Thus, less complex pivot elements will be 41 * prefer ed, and get therefore a smaller pivot score. Consequently,41 * preferred, and get therefore a smaller pivot score. Consequently, 42 42 * we simply return the value of nSize. 43 43 * An exception to this rule are the ground fields R, long R, and -
kernel/linear_algebra/linearAlgebra.h
r323776f r0a4a20d 13 13 * the entries of the matrices are 'numbers' representing elements of K (and 14 14 * NOT 'polys' in K[x_1, x_2, ..., x_n]). 15 * This restriction may become obs elete in the future.15 * This restriction may become obsolete in the future. 16 16 * 17 17 * @author Frank Seelisch -
kernel/linear_algebra/linear_algebra.dox
r323776f r0a4a20d 1 /*! \page kernel_linear_algebra_page Lin ar algebra related algorithms1 /*! \page kernel_linear_algebra_page Linear algebra related algorithms 2 2 3 3 This sub-package of kernel (\ref kernel_page) contains -
kernel/linear_algebra/minpoly.h
r323776f r0a4a20d 22 22 * Every time a new row VA^i is inserted, it is reduced via Gauss' Algorithm, * 23 23 * using right hand sides. If VA^i is reduced to zero, then the vectors are * 24 * linearly dependen d, and the dependency can be read of at the right hand sides. *24 * linearly dependent, and the dependency can be read of at the right hand sides. * 25 25 * * 26 26 * Example: Compute the minimal polynomial of A = [[0,1],[1,1]] with V = [1,0] * … … 81 81 82 82 // reset the matrix, so that we can use it to find another linear dependence 83 // Note: there is no need to reinit alize the matrix and vectors!83 // Note: there is no need to reinitialize the matrix and vectors! 84 84 void resetMatrix(); 85 85 -
kernel/linear_algebra/test.cc
r323776f r0a4a20d 314 314 poly p1=pISet(1); 315 315 316 // create t the polynomial 2*x^3*z^2316 // create the polynomial 2*x^3*z^2 317 317 poly p2=p_ISet(2,R); 318 318 pSetExp(p2,1,3); -
kernel/maps/fast_maps.cc
r323776f r0a4a20d 432 432 **********************************************************************/ 433 433 434 // substitute p everywhere the monomial occ ours,434 // substitute p everywhere the monomial occurs, 435 435 // return the number of substitutions 436 436 static int maPoly_Substitute(macoeff c, poly p, ring dest_r) -
kernel/maps/fast_maps.h
r323776f r0a4a20d 75 75 // inserts ("adds") monomial what into poly into 76 76 // returns the maMonomial which was inserted, or, if an equal one was found, 77 // the monomial which "swallo ed" the monomial77 // the monomial which "swallowed" the monomial 78 78 // It furthermore might reset into 79 79 mapoly maPoly_InsertMonomial(mapoly &into, mapoly what, ring src_r); … … 96 96 ring &src_r, ring &dest_r, BOOLEAN &no_sort); 97 97 98 // collects t the results into an ideal and destroys maideal98 // collects the results into an ideal and destroys maideal 99 99 ideal maIdeal_2_Ideal(maideal ideal, ring dest_r); 100 100 -
kernel/maps/find_perm.cc
r323776f r0a4a20d 4 4 /*************************************************************** 5 5 * File: find_perm.cc 6 * Purpose: is a map a permu ation ?6 * Purpose: is a map a permutation ? 7 7 * Author: hannes 8 8 * Created: 16/01 -
kernel/maps/gen_maps.cc
r323776f r0a4a20d 109 109 } 110 110 // ---------------------------------------------------------- 111 // long polys in the image ?: possib lity of many common subexpressions111 // long polys in the image ?: possibility of many common subexpressions 112 112 if ((nMap==ndCopyMap) /* and !rIsPluralRing(image_r) */ 113 113 && (map_id->nrows==1) /* i.e. only for ideal/map */ -
kernel/maps/gen_maps.h
r323776f r0a4a20d 9 9 /// image_id: the image of the variables 10 10 /// image_r: the base ring for image_id 11 /// nMap: map for coeff cients11 /// nMap: map for coefficients 12 12 ideal maMapIdeal(const ideal map_id, const ring map_r,const ideal image_id, const ring image_r, const nMapFunc nMap); 13 13 … … 17 17 /// image_id: the image of the variables 18 18 /// image_r: the base ring for image_id 19 /// nMap: map for coeff cients19 /// nMap: map for coefficients 20 20 poly maMapPoly(const poly map_p, const ring map_r,const ideal image_id, const ring image_r, const nMapFunc nMap); 21 21 -
kernel/maps/test.cc
r323776f r0a4a20d 314 314 poly p1=pISet(1); 315 315 316 // create t the polynomial 2*x^3*z^2316 // create the polynomial 2*x^3*z^2 317 317 poly p2=p_ISet(2,R); 318 318 pSetExp(p2,1,3); -
kernel/mod2.h
r323776f r0a4a20d 88 88 89 89 /******************************************************************* 90 * Miscellan ous Defines90 * Miscellaneous Defines 91 91 ******************************************************************/ 92 92 #ifndef HAVE_LIBPARSER … … 186 186 The omDebug routines are controlled by the values of OM_TRACK, OM_CHECK 187 187 and OM_KEEP. There meaning is roughly as follows: 188 OM_TRACK: st rored with address: extra space189 0 : no additional info is stored : 0190 1 : file:line of location where address was allocated : 1 word191 2 : plus backtrace of stack where ad ress was allocated: 6 words192 3 : plus size/bin info and front-, and back padding : 9 words193 4 : plus file:line of location where ad ress was freed: 10 words194 5 : plus backtrace of stack where ad ress was allocated: 15 words188 OM_TRACK: stored with address : extra space 189 0 : no additional info is stored : 0 190 1 : file:line of location where address was allocated : 1 word 191 2 : plus backtrace of stack where address was allocated : 6 words 192 3 : plus size/bin info and front-, and back padding : 9 words 193 4 : plus file:line of location where address was freed : 10 words 194 5 : plus backtrace of stack where address was allocated : 15 words 195 195 OM_CHECK: checks done 196 196 0 : no checks … … 224 224 ExternalRoutine(); 225 225 om_Opts.MinCheck = check; omOpts.MinTrack = track; omOpts.Keep = keep; 226 ensures that all calls omDebug routines occur ing during the computation of226 ensures that all calls omDebug routines occurring during the computation of 227 227 ExternalRoutine() are done with OM_CHECK==3 and OM_TRACK==5, and 228 228 calls to omFree only mark addresses as free and not really free them. … … 254 254 + You can safely use any free/realloc routine in combination with any alloc 255 255 routine (including the debug versions): E.g., an address allocated with 256 omAllocBin can be freed with omfree, or an ad ress allocated with256 omAllocBin can be freed with omfree, or an address allocated with 257 257 om(Debug)Alloc can be freed with omfree, or omFree, or omFreeSize, etc. 258 258 However, keep in mind that the efficiency decreases from -
kernel/numeric/mpr_base.cc
r323776f r0a4a20d 95 95 96 96 /* Remaps a result of LP to the according point set Qi. 97 * Returns false iff remap ing was not possible, otherwise true.97 * Returns false iff remapping was not possible, otherwise true. 98 98 */ 99 99 bool remapXiToPoint( const int indx, pointSet **pQ, int *set, int *vtx ); … … 176 176 inline onePointP operator[] ( const int index ); 177 177 178 /** Adds a point to pointSet, copy vert[0,...,dim] otpoint[num+1][0,...,dim].178 /** Adds a point to pointSet, copy vert[0,...,dim] to point[num+1][0,...,dim]. 179 179 * Returns false, iff additional memory was allocated ( i.e. num >= max ) 180 180 * else returns true … … 182 182 bool addPoint( const onePointP vert ); 183 183 184 /** Adds a point to pointSet, copy vert[0,...,dim] otpoint[num+1][0,...,dim].184 /** Adds a point to pointSet, copy vert[0,...,dim] to point[num+1][0,...,dim]. 185 185 * Returns false, iff additional memory was allocated ( i.e. num >= max ) 186 186 * else returns true … … 188 188 bool addPoint( const int * vert ); 189 189 190 /** Adds a point to pointSet, copy vert[0,...,dim] otpoint[num+1][0,...,dim].190 /** Adds a point to pointSet, copy vert[0,...,dim] to point[num+1][0,...,dim]. 191 191 * Returns false, iff additional memory was allocated ( i.e. num >= max ) 192 192 * else returns true … … 295 295 void runMayanPyramid( int dim ); 296 296 297 /** Compute v-distance via Linear Program ing297 /** Compute v-distance via Linear Programming 298 298 * Linear Program finds the v-distance of the point in accords[]. 299 299 * The v-distance is the distance along the direction v to boundary of … … 1197 1197 { // acoords[dim] >= minR ?? 1198 1198 mprSTICKYPROT(ST_SPARSE_MREC1); 1199 runMayanPyramid( dim + 1 ); // recurse with hig er dimension1199 runMayanPyramid( dim + 1 ); // recurse with higher dimension 1200 1200 } 1201 1201 else … … 1207 1207 { 1208 1208 mprSTICKYPROT(ST_SPARSE_MREC2); 1209 runMayanPyramid( dim + 1 ); // recurse with hig er dimension1209 runMayanPyramid( dim + 1 ); // recurse with higher dimension 1210 1210 } 1211 1211 } … … 1256 1256 LP->n++; 1257 1257 1258 // objective fun tion, minimize1258 // objective function, minimize 1259 1259 LP->LiPM[1][LP->n] = - ( (mprfloat) (*pQ[i])[k]->point[pQ[i]->dim] / SCALEDOWN ); 1260 1260 … … 1454 1454 if ( epos == 0 ) 1455 1455 { 1456 // this can happen, if the shift ve ktor or the lift funktions1456 // this can happen, if the shift vector or the lift functions 1457 1457 // are not generically chosen. 1458 1458 Werror("resMatrixSparse::createMatrix: Found exponent not in E, id %d, set [%d, %d]!", -
kernel/numeric/mpr_numeric.h
r323776f r0a4a20d 200 200 int m1,m2,m3; // constraints <=, >= and == 201 201 int icase; // == 0: finite solution found; 202 // == +1 objective fun tion unbound; == -1: no solution202 // == +1 objective function unbound; == -1: no solution 203 203 int *izrov,*iposv; 204 204 -
kernel/numeric/test.cc
r323776f r0a4a20d 314 314 poly p1=pISet(1); 315 315 316 // create t the polynomial 2*x^3*z^2316 // create the polynomial 2*x^3*z^2 317 317 poly p2=p_ISet(2,R); 318 318 pSetExp(p2,1,3); -
kernel/old/old.Poly.h
r323776f r0a4a20d 340 340 ptr->print(); 341 341 } 342 //* res source managed by Singular342 //* resource managed by Singular 343 343 char* c_string() const{ 344 344 -
kernel/old/old.PowerSeries.h
r323776f r0a4a20d 141 141 PowerSeriesBase(const numerator_type &a, const denominator_type & b):numerator(a),denominator(b){ 142 142 assume(a.getRing()==b.getRing()); 143 //as ume b!=NULL143 //assume b!=NULL 144 144 } 145 145 typedef PowerSeriesInputIterator<traits> iterator; -
kernel/oswrapper/feread.cc
r323776f r0a4a20d 124 124 #endif 125 125 #ifndef READLINE_READLINE_H_OK 126 /* declare everything we need explicit ely and do not rely on includes */126 /* declare everything we need explicitly and do not rely on includes */ 127 127 EXTERN_VAR char * rl_readline_name; 128 128 EXTERN_VAR char *rl_line_buffer; -
kernel/oswrapper/test.cc
r323776f r0a4a20d 314 314 poly p1=pISet(1); 315 315 316 // create t the polynomial 2*x^3*z^2316 // create the polynomial 2*x^3*z^2 317 317 poly p2=p_ISet(2,R); 318 318 pSetExp(p2,1,3); -
kernel/oswrapper/vspace.h
r323776f r0a4a20d 116 116 #endif 117 117 #ifdef HAVE_CPP_THREADS 118 // We only need to define the copy construct ur for the118 // We only need to define the copy constructor for the 119 119 // atomic version, as the std::atomic_flag constructor 120 120 // is deleted. … … 1447 1447 #endif 1448 1448 #ifdef HAVE_CPP_THREADS 1449 // We only need to define the copy construct ur for the1449 // We only need to define the copy constructor for the 1450 1450 // atomic version, as the std::atomic_flag constructor 1451 1451 // is deleted. -
kernel/polys.cc
r323776f r0a4a20d 9 9 #include "polys/clapconv.h" 10 10 11 /// Widely used global variable which specifies the current polynomial ring for Singular interpreter and legacy implementati ns.11 /// Widely used global variable which specifies the current polynomial ring for Singular interpreter and legacy implementations. 12 12 /// @Note: one should avoid using it in newer designs, for example due to possible problems in parallelization with threads. 13 13 VAR ring currRing = NULL; -
kernel/polys.h
r323776f r0a4a20d 1 /*! \file kernel/polys.h Compatib lity layer for legacy polynomial operations (over @ref currRing)1 /*! \file kernel/polys.h Compatibility layer for legacy polynomial operations (over @ref currRing) 2 2 3 3 Macro defines for legacy polynomial operations used in @ref kernel_page and @ref singular_page. … … 5 5 Notice that they have different prefix: `p` instead of `p_`. 6 6 7 See also related global ring variable and the correct ring chang eing routine:7 See also related global ring variable and the correct ring changing routine: 8 8 - \ref currRing 9 9 - \ref rChangeCurrRing … … 52 52 /*************************************************************** 53 53 * 54 * Allocation/Init alization/Deletion54 * Allocation/Initialization/Deletion 55 55 * except for pHead, all polys must be != NULL 56 56 * … … 162 162 /// polynomial division a/b, ignoring the rest 163 163 /// via singclap_pdivide resp. idLift 164 /// destroy es a,b164 /// destroys a,b 165 165 poly p_Divide(poly a, poly b, const ring r); 166 166 /// polynomial division a/b, ignoring the rest … … 222 222 223 223 224 /// Assume: If consider d only as poly in any component of p224 /// Assume: If considered only as poly in any component of p 225 225 /// (say, monomials of other components of p are set to 0), 226 226 /// then p is already sorted correctly … … 275 275 /*************************************************************** 276 276 * 277 * Degree stuff -- see p_polys.cc for expla inations277 * Degree stuff -- see p_polys.cc for explanations 278 278 * 279 279 ***************************************************************/ … … 371 371 #define pMinDeg(p,w) p_MinDeg(p,w,currRing) 372 372 #define pSeries(n,p,u,w) p_Series(n,p,u,w,currRing) 373 // maximum weig thed degree of all monomials of p, w is indexed from373 // maximum weighted degree of all monomials of p, w is indexed from 374 374 // 1..pVariables 375 375 -
kernel/preimage.cc
r323776f r0a4a20d 19 19 *shifts the variables between minvar and maxvar of p \in p_ring to the 20 20 *first maxvar-minvar+1 variables in the actual ring 21 *be careful l: there is no range check for the variables of p21 *be careful: there is no range check for the variables of p 22 22 */ 23 23 static poly pChangeSizeOfPoly(ring p_ring, poly p,int minvar,int maxvar, const ring dst_r) … … 132 132 tmpR); 133 133 } 134 // we ignore here homogen ity - may be changed later:134 // we ignore here homogeneity - may be changed later: 135 135 136 136 temp2 = kStd(temp1,NULL,isNotHomog,NULL); -
kernel/test.cc
r323776f r0a4a20d 544 544 poly p1=pISet(1); 545 545 546 // create t the polynomial 2*x^3*z^2546 // create the polynomial 2*x^3*z^2 547 547 poly p2=p_ISet(2,R); 548 548 pSetExp(p2,1,3);
Note: See TracChangeset
for help on using the changeset viewer.