- Timestamp:
- Nov 24, 2018, 4:47:57 PM (5 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- 2b556a233dfaeb437351a31315ce8aa41a63ef72
- Parents:
- 352a92c88d03b3b9cf5dcabdeb7619670ccc7228
- git-author:
- Karim Abou Zeid <karim23697@gmail.com>2018-11-24 16:47:57+01:00
- git-committer:
- Karim Abou Zeid <karim23697@gmail.com>2018-11-28 06:55:27+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/polys0.cc
r352a92c rd08de4 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)) 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 99 88 wroteCoef=(bNotShortOut); 100 writeGen=TRUE; 101 StringAppendS(rRingVar(i, r)); 102 if (ee != 1L) 89 writeGen=TRUE; 90 if (writeEmptyBlock) 91 StringAppendS("_"); 92 else 93 { 94 StringAppendS(rRingVar(i, r)); 95 if (ee != 1L) 96 { 97 if (bNotShortOut) StringAppendS("^"); 98 StringAppend("%ld", ee); 99 } 100 wroteBlock = TRUE; 101 } 102 } 103 if (endOfBlock) 104 wroteBlock = FALSE; 105 } 106 } 107 } 108 else 109 #endif 110 { 111 for (i=0; i<rVar(r); i++) 112 { 113 { 114 long ee = p_GetExp(p,i+1,r); 115 if (ee!=0L) 103 116 { 104 if (bNotShortOut) StringAppendS("^"); 105 StringAppend("%ld", ee); 117 if (wroteCoef) 118 StringAppendS("*"); 119 //else 120 wroteCoef=(bNotShortOut); 121 writeGen=TRUE; 122 StringAppendS(rRingVar(i, r)); 123 if (ee != 1L) 124 { 125 if (bNotShortOut) StringAppendS("^"); 126 StringAppend("%ld", ee); 127 } 106 128 } 107 129 }
Note: See TracChangeset
for help on using the changeset viewer.