Changeset 9e806f in git for kernel/kutil.h
- Timestamp:
- Jul 12, 2012, 3:24:21 PM (12 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 010b3f834f90fe0815d115c4a3a4c6934a96ac81
- Parents:
- cffd3e2f630fbc7b0e35afee97d6fa948cfd0b3e19609cce8ae122e920a77ead0ddc3ea3984ecc0d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kutil.h
rcffd3e r9e806f 67 67 { 68 68 public: 69 unsigned long sevSig; 70 poly sig; // the signature of the element 69 71 poly p; // Lm(p) \in currRing Tail(p) \in tailRing 70 72 poly t_p; // t_p \in tailRing: as monomials Lm(t_p) == Lm(p) … … 77 79 i_r; // index of TObject in R set, or -1 if not in T 78 80 BOOLEAN is_normalized; // true, if pNorm was called on p, false otherwise 81 // used in incremental sba() with F5C: 82 // we know some of the redundant elements in 83 // strat->T beforehand, so we can just discard 84 // them and do not need to consider them in the 85 // interreduction process 86 BOOLEAN is_redundant; 87 // used in sba's sig-safe reduction: 88 // sometimes we already know that a reducer 89 // is sig-safe, so no need for a real 90 // sig-safeness check 91 BOOLEAN is_sigsafe; 92 79 93 80 94 #ifdef HAVE_PLURAL … … 167 181 public: 168 182 unsigned long sev; 183 unsigned long from; // from which polynomial it comes from 184 // this is important for signature-based 185 // algorithms 186 unsigned long checked; // this is the index of S up to which 187 // the corresponding LObject was already checked in 188 // critical pair creation => when entering the 189 // reduction process it is enough to start a second 190 // rewritten criterion check from checked+1 onwards 169 191 poly p1,p2; /*- the pair p comes from, 170 192 lm(pi) in currRing, tail(pi) in tailring -*/ … … 252 274 kStrategy next; 253 275 int (*red)(LObject * L,kStrategy strat); 276 int (*red2)(LObject * L,kStrategy strat); 254 277 void (*initEcart)(LObject * L); 255 278 int (*posInT)(const TSet T,const int tl,LObject &h); 279 int (*posInLSba)(const LSet set, const int length, 280 LObject* L,const kStrategy strat); 256 281 int (*posInL)(const LSet set, const int length, 257 282 LObject* L,const kStrategy strat); … … 262 287 void (*enterOnePair) (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR /*= -1*/); 263 288 void (*chainCrit) (poly p,int ecart,kStrategy strat); 289 BOOLEAN (*syzCrit) (poly sig, unsigned long not_sevSig, kStrategy strat); 290 BOOLEAN (*rewCrit1) (poly sig, unsigned long not_sevSig, kStrategy strat, int start /*= 0*/); 291 BOOLEAN (*rewCrit2) (poly sig, unsigned long not_sevSig, kStrategy strat, int start /*= 0*/); 264 292 pFDegProc pOrigFDeg; 265 293 pLDegProc pOrigLDeg; … … 272 300 ideal M; /*set of minimal generators*/ 273 301 polyset S; 302 polyset syz; 303 polyset sig; 274 304 intset ecartS; 305 intset fromS; // from which S[i] S[j] comes from 306 // this is important for signature-based 307 // algorithms 308 intset syzIdx;// index in the syz array at which the first 309 // syzygy of component i comes up 310 // important for signature-based algorithms 311 BOOLEAN incremental; 312 unsigned long currIdx; 313 int max_lower_index; 275 314 intset lenS; 276 315 wlen_set lenSw; /* for tgb.ccc */ 277 316 intset fromQ; 278 317 unsigned long* sevS; 318 unsigned long* sevSyz; 319 unsigned long* sevSig; 279 320 unsigned long* sevT; 280 321 TSet T; … … 306 347 int cv; // in shift bases: counting V criterion 307 348 int sl,mu; 349 int syzl,syzmax,syzidxmax; 308 350 int tl,tmax; 309 351 int Ll,Lmax; … … 367 409 void deleteHC(LObject* L, kStrategy strat, BOOLEAN fromNext = FALSE); 368 410 void deleteInS (int i,kStrategy strat); 411 void deleteInSSba (int i,kStrategy strat); 369 412 void cleanT (kStrategy strat); 370 413 static inline LSet initL (int nr=setmaxL) … … 373 416 void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at); 374 417 void enterSBba (LObject p,int atS,kStrategy strat, int atR = -1); 418 void enterSSba (LObject p,int atS,kStrategy strat, int atR = -1); 375 419 void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG); 376 420 void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG); … … 381 425 int posInT2 (const TSet set,const int length,LObject &p); 382 426 int posInT11 (const TSet set,const int length,LObject &p); 427 int posInTSig (const TSet set,const int length,LObject &p); 383 428 int posInT110 (const TSet set,const int length,LObject &p); 384 429 int posInT13 (const TSet set,const int length,LObject &p); … … 396 441 397 442 void reorderS (int* suc,kStrategy strat); 443 int posInLF5C (const LSet set, const int length, 444 LObject* L,const kStrategy strat); 445 int posInLSig (const LSet set, const int length, 446 LObject* L,const kStrategy strat); 398 447 int posInL0 (const LSet set, const int length, 399 448 LObject* L,const kStrategy strat); … … 437 486 int redLazy (LObject* h,kStrategy strat); 438 487 int redHomog (LObject* h,kStrategy strat); 488 int redSig (LObject* h,kStrategy strat); 489 //adds hSig to be able to check with F5's criteria when entering pairs! 490 void enterpairsSig (poly h, poly hSig, int from, int k, int ec, int pos,kStrategy strat, int atR = -1); 439 491 void enterpairs (poly h, int k, int ec, int pos,kStrategy strat, int atR = -1); 440 492 void entersets (LObject h); … … 452 504 void initS (ideal F, ideal Q,kStrategy strat); 453 505 void initSL (ideal F, ideal Q,kStrategy strat); 506 void initSLSba (ideal F, ideal Q,kStrategy strat); 507 /************************************************* 508 * when initializing a new bunch of principal 509 * syzygies at the beginning of a new iteration 510 * step in a signature-based algorithm we 511 * compute ONLY the leading elements of those 512 * syzygies, NOT the whole syzygy 513 * NOTE: this needs to be adjusted for a more 514 * general approach on signature-based algorithms 515 ***********************************************/ 516 void initSyzRules (kStrategy strat); 454 517 void updateS(BOOLEAN toT,kStrategy strat); 518 void enterSyz (LObject p,kStrategy strat); 455 519 void enterT (LObject p,kStrategy strat, int atT = -1); 456 520 void cancelunit (LObject* p,BOOLEAN inNF=FALSE); 457 521 void HEckeTest (poly pp,kStrategy strat); 458 522 void initBuchMoraCrit(kStrategy strat); 523 void initSbaCrit(kStrategy strat); 459 524 void initHilbCrit(ideal F, ideal Q, intvec **hilb,kStrategy strat); 460 525 void initBuchMoraPos(kStrategy strat); 526 void initSbaPos(kStrategy strat); 461 527 void initBuchMora (ideal F, ideal Q,kStrategy strat); 528 void initSbaBuchMora (ideal F, ideal Q,kStrategy strat); 462 529 void exitBuchMora (kStrategy strat); 530 void exitSba (kStrategy strat); 463 531 void updateResult(ideal r,ideal Q,kStrategy strat); 464 532 void completeReduce (kStrategy strat, BOOLEAN withT=FALSE); 465 533 void kFreeStrat(kStrategy strat); 466 534 void enterOnePairNormal (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR); 535 void enterOnePairSig (int i,poly p,poly pSig,int ecart, int isFromQ,kStrategy strat, int atR); 467 536 void chainCritNormal (poly p,int ecart,kStrategy strat); 537 void chainCritSig (poly p,int ecart,kStrategy strat); 468 538 BOOLEAN homogTest(polyset F, int Fmax); 469 539 BOOLEAN newHEdge(kStrategy strat); 540 BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat); 541 BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat); 542 KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 543 BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 544 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 545 BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start); 470 546 // returns index of p in TSet, or -1 if not found 471 547 int kFindInT(poly p, TSet T, int tlength); … … 541 617 poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing); 542 618 ideal bba (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat); 619 ideal sba (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat); 543 620 poly kNF2 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce); 544 621 ideal kNF2 (ideal F,ideal Q,ideal q, kStrategy strat, int lazyReduce); 545 622 void initBba(ideal F,kStrategy strat); 623 void initSba(ideal F,kStrategy strat); 624 void f5c (kStrategy strat, int& olddeg, int& minimcnt, int& hilbeledeg, 625 int& hilbcount, int& srmax, int& lrmax, int& reduc, ideal Q, 626 intvec *w,intvec *hilb ); 546 627 547 628 /*************************************************************** … … 569 650 kStrategy strat = NULL); 570 651 652 // Reduces PR with PW 653 // Assumes PR != NULL, PW != NULL, Lm(PW) divides Lm(PR) 654 // Changes: PR 655 // Const: PW 656 // If coef != NULL, then *coef is a/gcd(a,b), where a = LC(PR), b = LC(PW) 657 // If strat != NULL, tailRing is changed if reduction would violate exp bound 658 // of tailRing 659 // Returns: 0 everything ok, no tailRing change 660 // 1 tailRing has successfully changed (strat != NULL) 661 // 2 no reduction performed, tailRing needs to be changed first 662 // (strat == NULL) 663 // 3 no reduction performed, not sig-safe!!! 664 // -1 tailRing change could not be performed due to exceeding exp 665 // bound of currRing 666 int ksReducePolySig(LObject* PR, 667 TObject* PW, 668 long idx, 669 poly spNoether = NULL, 670 number *coef = NULL, 671 kStrategy strat = NULL); 672 571 673 // Reduces PR at Current->next with PW 572 674 // Assumes PR != NULL, Current contained in PR … … 638 740 void kDebugPrint(kStrategy strat); 639 741 742 // getting sb order for sba computations 743 ring sbaRing(kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1); 640 744 641 745 KINLINE void clearS (poly p, unsigned long p_sev, int* at, int* k,
Note: See TracChangeset
for help on using the changeset viewer.