Changeset 5956ac9 in git
- Timestamp:
- Dec 3, 2018, 3:06:25 PM (5 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- a2e710f5fec606bbc77b74c30907c0b6defd141d
- Parents:
- 65e8f13fcb176d13e624ff95cb8efa00cf8fea763055a67024ccc2284bfe7f6f6484aa74f17a0b73
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/ring.cc
r3055a6 r5956ac9 345 345 if (r->wvhdl[l]!=NULL) 346 346 { 347 #ifndef SING_NDEBUG 348 if((r->order[l] != ringorder_wp) 349 &&(r->order[l] != ringorder_Wp) 350 &&(r->order[l] != ringorder_ws) 351 &&(r->order[l] != ringorder_Ws) 352 &&(r->order[l] != ringorder_a) 353 &&(r->order[l] != ringorder_am) 354 &&(r->order[l] != ringorder_M)) 355 { 356 Warn("should not have wvhdl entry at pos. %d",l); 357 } 358 #endif 347 359 for (int j= 0; 348 360 j<(r->block1[l]-r->block0[l]+1)*(r->block1[l]-r->block0[l]+1); … … 534 546 if (r->wvhdl[l]!=NULL) 535 547 { 536 StringAppendS("("); 537 for (int j= 0; 538 j<(r->block1[l]-r->block0[l]+1)*(r->block1[l]-r->block0[l]+1); 539 j+=i+1) 548 #ifndef SING_NDEBUG 549 if((r->order[l] != ringorder_wp) 550 &&(r->order[l] != ringorder_Wp) 551 &&(r->order[l] != ringorder_ws) 552 &&(r->order[l] != ringorder_Ws) 553 &&(r->order[l] != ringorder_a) 554 &&(r->order[l] != ringorder_am) 555 &&(r->order[l] != ringorder_M)) 540 556 { 541 char c=','; 542 if(r->order[l]==ringorder_a64) 557 Warn("should not have wvhdl entry at pos. %d",l); 558 StringAppend("(%d)",r->block1[l]-r->block0[l]+1); 559 } 560 else 561 #endif 562 { 563 StringAppendS("("); 564 for (int j= 0; 565 j<(r->block1[l]-r->block0[l]+1)*(r->block1[l]-r->block0[l]+1); 566 j+=i+1) 543 567 { 544 int64 * w=(int64 *)r->wvhdl[l];545 for (i = 0; i<r->block1[l]-r->block0[l]; i++)568 char c=','; 569 if(r->order[l]==ringorder_a64) 546 570 { 547 StringAppend("%lld," ,w[i]); 571 int64 * w=(int64 *)r->wvhdl[l]; 572 for (i = 0; i<r->block1[l]-r->block0[l]; i++) 573 { 574 StringAppend("%lld," ,w[i]); 575 } 576 StringAppend("%lld)" ,w[i]); 577 break; 548 578 } 549 StringAppend("%lld)" ,w[i]); 550 break; 579 else 580 { 581 for (i = 0; i<r->block1[l]-r->block0[l]; i++) 582 { 583 StringAppend("%d," ,r->wvhdl[l][i+j]); 584 } 585 } 586 if (r->order[l]!=ringorder_M) 587 { 588 StringAppend("%d)" ,r->wvhdl[l][i+j]); 589 break; 590 } 591 if (j+i+1==(r->block1[l]-r->block0[l]+1)*(r->block1[l]-r->block0[l]+1)) 592 c=')'; 593 StringAppend("%d%c" ,r->wvhdl[l][i+j],c); 551 594 } 552 else553 {554 for (i = 0; i<r->block1[l]-r->block0[l]; i++)555 {556 StringAppend("%d," ,r->wvhdl[l][i+j]);557 }558 }559 if (r->order[l]!=ringorder_M)560 {561 StringAppend("%d)" ,r->wvhdl[l][i+j]);562 break;563 }564 if (j+i+1==(r->block1[l]-r->block0[l]+1)*(r->block1[l]-r->block0[l]+1))565 c=')';566 StringAppend("%d%c" ,r->wvhdl[l][i+j],c);567 595 } 568 596 } -
libpolys/polys/polys0.cc
r65e8f1 r5956ac9 28 28 assume(C != NULL); 29 29 30 #ifdef HAVE_SHIFTBBA31 if (r->isLPring)32 {33 if (!p_mIsInV(p, r))34 {35 /*36 * the monomial is not a valid letterplace monomial37 * without this warning one cannot distinguish between38 * x(1)*x(3) and x(1)*x(2) because they would both be displayed39 * as x*x40 */41 int *expV = (int *) omAlloc((r->N+1)*sizeof(int));42 p_GetExpV(p, expV, r);43 char* s = LPExpVString(expV, r);44 Warn("invalid letterplace monomial: (%s)", s);45 omFreeSize((ADDRESS) expV, (r->N+1)*sizeof(int));46 omFree(s);47 }48 }49 #endif50 51 30 BOOLEAN wroteCoef=FALSE,writeGen=FALSE; 52 31 const BOOLEAN bNotShortOut = (rShortOut(r) == FALSE); … … 88 67 89 68 int i; 90 for (i=0; i<rVar(r); i++) 91 { 92 { 93 long ee = p_GetExp(p,i+1,r); 94 if (ee!=0L) 69 #ifdef HAVE_SHIFTBBA 70 if (rIsLPRing(r)) // this implies bNotShortOut 71 { 72 int lV = r->isLPring; 73 int lastVar = p_mLastVblock(p, r) * lV; 74 BOOLEAN wroteBlock = FALSE; 75 for (i=0; i<rVar(r); i++) 76 { 95 77 { 96 if (wroteCoef) 97 StringAppendS("*"); 98 //else 78 long ee = p_GetExp(p,i+1,r); 79 BOOLEAN endOfBlock = ((i+1) % lV) == 0; 80 BOOLEAN writeEmptyBlock = ee==0L && endOfBlock && !wroteBlock && i < lastVar; 81 if (ee!=0L || writeEmptyBlock) 82 { 83 if (wroteBlock) 84 StringAppendS("&"); 85 else if (wroteCoef) 86 StringAppendS("*"); 87 //else 88 wroteCoef=TRUE; //(bNotShortOut); 89 writeGen=TRUE; 90 if (writeEmptyBlock) 91 StringAppendS("_"); 92 else 93 { 94 StringAppendS(rRingVar(i, r)); 95 if (ee != 1L) 96 { 97 StringAppend("^%ld", ee); 98 } 99 wroteBlock = TRUE; 100 } 101 } 102 if (endOfBlock) 103 wroteBlock = FALSE; 104 } 105 } 106 } 107 else 108 #endif 109 { 110 for (i=0; i<rVar(r); i++) 111 { 112 { 113 long ee = p_GetExp(p,i+1,r); 114 if (ee!=0L) 115 { 116 if (wroteCoef) 117 StringAppendS("*"); 118 //else 99 119 wroteCoef=(bNotShortOut); 100 writeGen=TRUE; 101 StringAppendS(rRingVar(i, r)); 102 if (ee != 1L) 103 { 104 if (bNotShortOut) StringAppendS("^"); 105 StringAppend("%ld", ee); 120 writeGen=TRUE; 121 StringAppendS(rRingVar(i, r)); 122 if (ee != 1L) 123 { 124 if (bNotShortOut) StringAppendS("^"); 125 StringAppend("%ld", ee); 126 } 106 127 } 107 128 }
Note: See TracChangeset
for help on using the changeset viewer.