Changeset eb55f8a in git
- Timestamp:
- Sep 16, 2014, 4:56:19 PM (9 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 5b45a4ff15d0998cc64c730af75c1c1f773d4a77
- Parents:
- 4ec0f01d431893a4c0997d2bdfab87cb8d37e03e
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-09-16 16:56:19+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-09-23 20:10:49+02:00
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/dyn_modules/syzextra/mod_main.cc
r4ec0f0 reb55f8a 1361 1361 { 1362 1362 assume( p != NULL ); 1363 assume( p_LmTest(p, r));1363 p_LmTest(p, r); 1364 1364 1365 1365 const unsigned long iComp = p_GetComp(p, r); … … 1394 1394 1395 1395 assume( p != NULL ); 1396 assume( p_LmTest(p, r));1396 p_LmTest(p, r); 1397 1397 1398 1398 const int iExpSize = r->ExpL_Size; -
Singular/dyn_modules/syzextra/myNF.cc
r4ec0f0 reb55f8a 246 246 // pNorm(strat->S[i]); 247 247 //} 248 assume(kTest(strat));248 kTest(strat); 249 249 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 250 250 -
Singular/dyn_modules/syzextra/syzextra.cc
r4ec0f0 reb55f8a 87 87 assume( b != NULL ); 88 88 89 assume( p_LmTest(a, r));90 assume( p_LmTest(b, r));89 p_LmTest(a, r); 90 p_LmTest(b, r); 91 91 92 92 … … 165 165 assume( b != NULL ); 166 166 167 assume( p_LmTest(a, r));168 assume( p_LmTest(b, r));167 p_LmTest(a, r); 168 p_LmTest(b, r); 169 169 assume( p_GetComp(a, r) == 0 ); 170 170 assume( p_GetComp(b, r) == 0 ); … … 336 336 { 337 337 assume( p != NULL ); 338 assume( p_LmTest(p, r));338 p_LmTest(p, r); 339 339 340 340 m = p_LmInit(p, r); … … 348 348 assume( m != NULL ); 349 349 assume( pNext(m) == NULL ); 350 assume( p_LmTest(m, r));350 p_LmTest(m, r); 351 351 352 352 if( bSetZeroComp ) … … 1210 1210 1211 1211 sBucket_pt& tail = m_sum_bucket; assume( tail != NULL ); 1212 kBucket_pt& bucket = m_spoly_bucket; assume( bucket != NULL ); kbTest(bucket); 1212 kBucket_pt& bucket = m_spoly_bucket; assume( bucket != NULL ); 1213 kbTest(bucket); 1213 1214 1214 1215 -
Singular/maps_ip.cc
r4ec0f0 reb55f8a 265 265 266 266 number d = n_GetDenom(p_GetCoeff(p, currRing), currRing); 267 assume( p_Test((poly)NUM(d), R));267 p_Test((poly)NUM(d), R); 268 268 269 269 if ( n_IsOne (d, currRing->cf) ) … … 280 280 memset(&tmpW,0,sizeof(sleftv)); 281 281 tmpW.rtyp = POLY_CMD; 282 assume( p_Test((poly)NUM(num), R));282 p_Test((poly)NUM(num), R); 283 283 284 284 tmpW.data = NUM (num); // a copy of this poly will be used … … 318 318 memset(&tmpW,0,sizeof(sleftv)); 319 319 tmpW.rtyp = POLY_CMD; 320 assume( p_Test((poly)num, R));320 p_Test((poly)num, R); 321 321 322 322 -
kernel/GBEngine/kspoly.cc
r4ec0f0 reb55f8a 54 54 int ret = 0; 55 55 ring tailRing = PR->tailRing; 56 assume(kTest_L(PR));57 assume(kTest_T(PW));56 kTest_L(PR); 57 kTest_T(PW); 58 58 59 59 poly p1 = PR->GetLmTailRing(); // p2 | p1 … … 189 189 int ret = 0; 190 190 ring tailRing = PR->tailRing; 191 assume(kTest_L(PR));192 assume(kTest_T(PW));191 kTest_L(PR); 192 kTest_T(PW); 193 193 194 194 // signature-based stuff: … … 381 381 create_count++; 382 382 #endif 383 assume(kTest_L(Pair));383 kTest_L(Pair); 384 384 poly p1 = Pair->p1; 385 385 poly p2 = Pair->p2; … … 496 496 poly Save = PW->GetLmCurrRing(); 497 497 498 assume(kTest_L(PR));499 assume(kTest_T(PW));498 kTest_L(PR); 499 kTest_T(PW); 500 500 pAssume(pIsMonomOf(Lp, Current)); 501 501 -
kernel/GBEngine/kstd1.cc
r4ec0f0 reb55f8a 130 130 int ret; 131 131 #if KDEBUG > 0 132 assume(kTest_L(h));133 assume(kTest_T(with));132 kTest_L(h); 133 kTest_T(with); 134 134 #endif 135 135 // Hmmm ... why do we do this -- polys from T should already be normalized … … 1068 1068 1069 1069 int i = 0; 1070 assume(kTest_TS(strat));1070 kTest_TS(strat); 1071 1071 while (i <= strat->Ll) 1072 1072 { … … 1113 1113 { 1114 1114 #ifdef KDEBUG 1115 assume(kTest_L(&(strat->L[i]), strat->tailRing, TRUE, i, strat->T, strat->tl));1115 kTest_L(&(strat->L[i]), strat->tailRing, TRUE, i, strat->T, strat->tl); 1116 1116 #endif 1117 1117 i++; 1118 1118 } 1119 1119 } 1120 assume(kTest_TS(strat));1120 kTest_TS(strat); 1121 1121 } 1122 1122 … … 1152 1152 if (strat->update) 1153 1153 { 1154 assume(kTest_TS(strat));1154 kTest_TS(strat); 1155 1155 strat->update = (strat->tl == -1); 1156 1156 if (TEST_OPT_WEIGHTM) … … 1209 1209 #endif 1210 1210 } 1211 assume(kTest_TS(strat));1211 kTest_TS(strat); 1212 1212 } 1213 1213 … … 1531 1531 reorderL(strat); 1532 1532 } 1533 assume(kTest_TS(strat));1533 kTest_TS(strat); 1534 1534 strat->use_buckets = kMoraUseBucket(strat); 1535 1535 /*- compute-------------------------------------------*/ … … 1758 1758 } 1759 1759 } 1760 assume(kTest_TS(strat));1760 kTest_TS(strat); 1761 1761 1762 1762 #if ADIDEBUG … … 1899 1899 p = pCopy(q); 1900 1900 deleteHC(&p,&o,&j,strat); 1901 assume(kTest(strat));1901 kTest(strat); 1902 1902 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 1903 1903 if (BVERBOSE(23)) kDebugPrint(strat); … … 2908 2908 2909 2909 // strat->posInT = posInT_pLength; 2910 assume(kTest_TS(strat));2910 kTest_TS(strat); 2911 2911 2912 2912 #ifdef HAVE_TAIL_RING -
kernel/GBEngine/kstd2.cc
r4ec0f0 reb55f8a 834 834 //if (TEST_OPT_PROT) { PrintS("N"); mflush(); } 835 835 //L->Normalize(); // HANNES: should have a test 836 assume(kTest_L(L));836 kTest_L(L); 837 837 return L->GetLmCurrRing(); 838 838 } … … 1367 1367 1368 1368 // strat->posInT = posInT_pLength; 1369 assume(kTest_TS(strat));1369 kTest_TS(strat); 1370 1370 1371 1371 #ifdef KDEBUG … … 1594 1594 memset(&(strat->P), 0, sizeof(strat->P)); 1595 1595 #endif /* KDEBUG */ 1596 assume(kTest_TS(strat));1596 kTest_TS(strat); 1597 1597 } 1598 1598 #ifdef KDEBUG … … 1759 1759 1760 1760 // strat->posInT = posInT_pLength; 1761 assume(kTest_TS(strat));1761 kTest_TS(strat); 1762 1762 1763 1763 #ifdef KDEBUG … … 2246 2246 memset(&(strat->P), 0, sizeof(strat->P)); 2247 2247 #endif /* KDEBUG */ 2248 assume(kTest_TS(strat));2248 kTest_TS(strat); 2249 2249 } 2250 2250 #ifdef KDEBUG … … 2428 2428 // pNorm(strat->S[i]); 2429 2429 //} 2430 assume(kTest(strat));2430 kTest(strat); 2431 2431 if (TEST_OPT_PROT) { PrintS("r"); mflush(); } 2432 2432 if (BVERBOSE(23)) kDebugPrint(strat); … … 2899 2899 2900 2900 // strat->posInT = posInT_pLength; 2901 assume(kTest_TS(strat));2901 kTest_TS(strat); 2902 2902 2903 2903 #ifdef HAVE_TAIL_RING … … 3137 3137 memset(&(strat->P), 0, sizeof(strat->P)); 3138 3138 #endif 3139 assume(kTest_TS(strat));3139 kTest_TS(strat); 3140 3140 } 3141 3141 #ifdef KDEBUG -
kernel/GBEngine/kstdfac.cc
r4ec0f0 reb55f8a 158 158 { 159 159 // int i; 160 assume(kTest_TS(o));160 kTest_TS(o); 161 161 kStrategy s=new skStrategy; 162 162 s->next=NULL; … … 242 242 s->no_prod_crit=o->no_prod_crit; 243 243 #endif 244 assume(kTest_TS(s));244 kTest_TS(s); 245 245 return s; 246 246 } … … 542 542 if (TEST_OPT_REDSB) completeReduceFac(strat,FL); 543 543 } 544 assume(kTest_TS(strat));544 kTest_TS(strat); 545 545 while (strat->Ll >= 0) 546 546 { … … 583 583 } 584 584 /* reduction of the element choosen from L */ 585 assume(kTest_TS(strat));585 kTest_TS(strat); 586 586 red_result = strat->red(&strat->P,strat); 587 587 if (strat->P.p != NULL) … … 630 630 { 631 631 n=kStratCopy(strat); // includes memset(&n->P,0,sizeof(n->P)); 632 assume(kTest_TS(n));632 kTest_TS(n); 633 633 n->next=strat->next; 634 634 strat->next=n; … … 642 642 n->P.p=fac->m[i]; 643 643 n->initEcart(&n->P); 644 assume(kTest_TS(n));644 kTest_TS(n); 645 645 646 646 /* enter P.p into s and L */ … … 668 668 } 669 669 } 670 assume(kTest_TS(n));670 kTest_TS(n); 671 671 672 672 if (TEST_OPT_DEBUG) … … 695 695 } 696 696 } 697 assume(kTest_TS(n));697 kTest_TS(n); 698 698 /* construct D */ 699 699 if (IDELEMS(fac)>1) … … 851 851 strat->P.lcm=NULL; 852 852 #endif 853 assume(kTest_TS(strat));853 kTest_TS(strat); 854 854 if ((strat->Ll==-1) && (strat->sl>=0)) 855 855 { 856 856 if (TEST_OPT_REDSB) completeReduceFac(strat,FL); 857 857 } 858 assume(kTest_TS(strat));858 kTest_TS(strat); 859 859 } 860 860 if (TEST_OPT_DEBUG) messageSets(strat); -
kernel/GBEngine/kutil.cc
r4ec0f0 reb55f8a 237 237 if (strat->kHEdgeFound) 238 238 { 239 assume(kTest_L(L));239 kTest_L(L); 240 240 poly p1; 241 241 poly p = L->GetLmTailRing(); … … 304 304 kBucketDestroy(&bucket); 305 305 } 306 assume(kTest_L(L));306 kTest_L(L); 307 307 } 308 308 } … … 5509 5509 //if (TEST_OPT_PROT) { PrintS("N"); mflush(); } 5510 5510 //L->Normalize(); // HANNES: should have a test 5511 assume(kTest_L(L));5511 kTest_L(L); 5512 5512 return L->GetLmCurrRing(); 5513 5513 } … … 5615 5615 //if (TEST_OPT_PROT) { PrintS("N"); mflush(); } 5616 5616 //L->Normalize(); // HANNES: should have a test 5617 assume(kTest_L(L));5617 kTest_L(L); 5618 5618 return L->GetLmCurrRing(); 5619 5619 } … … 6868 6868 } 6869 6869 pLmDelete(&redSi); 6870 assume(kTest(strat));6870 kTest(strat); 6871 6871 } 6872 6872 i++; 6873 6873 } 6874 6874 #ifdef KDEBUG 6875 assume(kTest(strat));6875 kTest(strat); 6876 6876 #endif 6877 6877 if (any_change) reorderS(&suc,strat); … … 6914 6914 } 6915 6915 #ifdef KDEBUG 6916 assume(kTest(strat));6916 kTest(strat); 6917 6917 #endif 6918 6918 } … … 7229 7229 assume(p.sev == 0 || pGetShortExpVector(p.p) == p.sev); 7230 7230 strat->sevT[atT] = (p.sev == 0 ? pGetShortExpVector(p.p) : p.sev); 7231 assume(kTest_T(&(strat->T[atT])));7231 kTest_T(&(strat->T[atT])); 7232 7232 } 7233 7233 … … 8259 8259 if (TEST_OPT_PROT) 8260 8260 Print("[%lu:%d", (unsigned long) new_tailRing->bitmask, new_tailRing->ExpL_Size); 8261 assume(kTest_TS(strat));8261 kTest_TS(strat); 8262 8262 assume(new_tailRing != strat->tailRing); 8263 8263 pShallowCopyDeleteProc p_shallow_copy_delete … … 8324 8324 new_tailRing); 8325 8325 } 8326 assume(kTest_TS(strat));8326 kTest_TS(strat); 8327 8327 if (TEST_OPT_PROT) 8328 8328 PrintS("]"); … … 9794 9794 } 9795 9795 L->Normalize(); // HANNES: should have a test 9796 assume(kTest_L(L));9796 kTest_L(L); 9797 9797 return L->GetLmCurrRing(); 9798 9798 } -
kernel/GBEngine/sca.cc
r4ec0f0 reb55f8a 470 470 471 471 // strat->posInT = posInT_pLength; 472 assume(kTest_TS(strat));472 kTest_TS(strat); 473 473 474 474 #undef HAVE_TAIL_RING … … 799 799 #endif 800 800 801 assume(kTest_TS(strat)); // even of T is not used!801 kTest_TS(strat); // even of T is not used! 802 802 803 803 // Print("\n$\n"); … … 963 963 strat->use_buckets = kMoraUseBucket(strat); 964 964 965 assume(kTest_TS(strat));965 kTest_TS(strat); 966 966 967 967 … … 1197 1197 } 1198 1198 #endif 1199 assume(kTest_TS(strat));1199 kTest_TS(strat); 1200 1200 } 1201 1201 // - complete reduction of the standard basis------------------------ - -
libpolys/coeffs/coeffs.h
r4ec0f0 reb55f8a 708 708 static inline BOOLEAN n_DBTest(number n, const char *filename, const int linenumber, const coeffs r) 709 709 #else 710 static inline BOOLEAN n_DBTest(number, const char*, const int, const coeffs) 710 static inline BOOLEAN n_DBTest(number, const char*, const int, const coeffs) // is it really necessary to define this function in any case? 711 711 #endif 712 712 { 713 assume(r != NULL); 714 #ifdef LDEBUG 715 assume(r->cfDBTest != NULL); 713 #ifndef LDEBUG 714 return TRUE; 715 #else 716 assume(r != NULL); assume(r->cfDBTest != NULL); 716 717 return r->cfDBTest(n, filename, linenumber, r); 717 #else718 return TRUE;719 718 #endif 720 719 } -
libpolys/coeffs/modulop.cc
r4ec0f0 reb55f8a 54 54 BOOLEAN npGreaterZero (number k, const coeffs r) 55 55 { 56 assume( n_Test(k, r));56 n_Test(k, r); 57 57 58 58 int h = (int)((long) k); … … 70 70 number npMult (number a,number b, const coeffs r) 71 71 { 72 assume( n_Test(a, r));73 assume( n_Test(b, r));72 n_Test(a, r); 73 n_Test(b, r); 74 74 75 75 if (((long)a == 0) || ((long)b == 0)) 76 76 return (number)0; 77 77 number c = npMultM(a,b, r); 78 assume( n_Test(c, r));78 n_Test(c, r); 79 79 return c; 80 80 } … … 89 89 90 90 number c = (number)ii; 91 assume( n_Test(c, r));91 n_Test(c, r); 92 92 return c; 93 93 … … 100 100 int npInt(number &n, const coeffs r) 101 101 { 102 assume( n_Test(n, r));102 n_Test(n, r); 103 103 104 104 if ((long)n > (((long)r->ch) >>1)) return (int)((long)n -((long)r->ch)); … … 108 108 number npAdd (number a, number b, const coeffs r) 109 109 { 110 assume( n_Test(a, r));111 assume( n_Test(b, r));110 n_Test(a, r); 111 n_Test(b, r); 112 112 113 113 number c = npAddM(a,b, r); 114 114 115 assume( n_Test(c, r));115 n_Test(c, r); 116 116 117 117 return c; … … 120 120 number npSub (number a, number b, const coeffs r) 121 121 { 122 assume( n_Test(a, r));123 assume( n_Test(b, r));122 n_Test(a, r); 123 n_Test(b, r); 124 124 125 125 number c = npSubM(a,b,r); 126 126 127 assume( n_Test(c, r));127 n_Test(c, r); 128 128 129 129 return c; … … 132 132 BOOLEAN npIsZero (number a, const coeffs r) 133 133 { 134 assume( n_Test(a, r));134 n_Test(a, r); 135 135 136 136 return 0 == (long)a; … … 139 139 BOOLEAN npIsOne (number a, const coeffs r) 140 140 { 141 assume( n_Test(a, r));141 n_Test(a, r); 142 142 143 143 return 1 == (long)a; … … 146 146 BOOLEAN npIsMOne (number a, const coeffs r) 147 147 { 148 assume( n_Test(a, r));148 n_Test(a, r); 149 149 150 150 return ((r->npPminus1M == (long)a)&&((long)1!=(long)a)); … … 201 201 inline number npInversM (number c, const coeffs r) 202 202 { 203 assume( n_Test(c, r));203 n_Test(c, r); 204 204 #ifndef HAVE_DIV_MOD 205 205 number d = (number)(long)r->npExpTable[r->npPminus1M - r->npLogTable[(long)c]]; … … 213 213 number d = (number)inv; 214 214 #endif 215 assume( n_Test(d, r));215 n_Test(d, r); 216 216 return d; 217 217 … … 220 220 number npDiv (number a,number b, const coeffs r) 221 221 { 222 assume( n_Test(a, r));223 assume( n_Test(b, r));222 n_Test(a, r); 223 n_Test(b, r); 224 224 225 225 //#ifdef NV_OPS … … 247 247 #endif 248 248 249 assume( n_Test(d, r));249 n_Test(d, r); 250 250 return d; 251 251 … … 253 253 number npInvers (number c, const coeffs r) 254 254 { 255 assume( n_Test(c, r));255 n_Test(c, r); 256 256 257 257 if ((long)c==0) … … 262 262 number d = npInversM(c,r); 263 263 264 assume( n_Test(d, r));264 n_Test(d, r); 265 265 return d; 266 266 … … 269 269 number npNeg (number c, const coeffs r) 270 270 { 271 assume( n_Test(c, r));271 n_Test(c, r); 272 272 273 273 if ((long)c==0) return c; … … 275 275 #if 0 276 276 number d = npNegM(c,r); 277 assume( n_Test(d, r));277 n_Test(d, r); 278 278 return d; 279 279 #else 280 280 c = npNegM(c,r); 281 assume( n_Test(c, r));281 n_Test(c, r); 282 282 return c; 283 283 #endif … … 286 286 BOOLEAN npGreater (number a,number b, const coeffs r) 287 287 { 288 assume( n_Test(a, r));289 assume( n_Test(b, r));288 n_Test(a, r); 289 n_Test(b, r); 290 290 291 291 //return (long)a != (long)b; … … 295 295 BOOLEAN npEqual (number a,number b, const coeffs r) 296 296 { 297 assume( n_Test(a, r));298 assume( n_Test(b, r));297 n_Test(a, r); 298 n_Test(b, r); 299 299 300 300 // return (long)a == (long)b; … … 305 305 void npWrite (number &a, const coeffs r) 306 306 { 307 assume( n_Test(a, r));307 n_Test(a, r); 308 308 309 309 if ((long)a>(((long)r->ch) >>1)) StringAppend("-%d",(int)(((long)r->ch)-((long)a))); … … 314 314 void npPower (number a, int i, number * result, const coeffs r) 315 315 { 316 assume( n_Test(a, r));316 n_Test(a, r); 317 317 318 318 if (i==0) … … 379 379 } 380 380 } 381 assume( n_Test(*a, r));381 n_Test(*a, r); 382 382 return s; 383 383 } -
libpolys/polys/ext_fields/algext.cc
r4ec0f0 reb55f8a 936 936 } 937 937 definiteReduce(p, dst->extRing->qideal->m[0], dst); 938 assume (p_Test (p, dst->extRing));938 p_Test (p, dst->extRing); 939 939 if (!DENIS1(fa)) 940 940 { 941 941 definiteReduce(q, dst->extRing->qideal->m[0], dst); 942 assume (p_Test (q, dst->extRing));942 p_Test (q, dst->extRing); 943 943 if (q != NULL) 944 944 { … … 999 999 poly g = prMapR(f, nMap, rSrc, rDst); 1000 1000 1001 assume(n_Test((number)g, dst));1001 n_Test((number)g, dst); 1002 1002 return (number)g; 1003 1003 } … … 1029 1029 result=(number)g; 1030 1030 1031 assume(n_Test((number)result, dst));1031 n_Test((number)result, dst); 1032 1032 return (number)result; 1033 1033 } -
libpolys/polys/ext_fields/transext.cc
r4ec0f0 reb55f8a 80 80 81 81 #ifdef LDEBUG 82 #define ntTest(a) assume(ntDBTest(a,__FILE__,__LINE__,cf))82 #define ntTest(a) ntDBTest(a,__FILE__,__LINE__,cf) 83 83 BOOLEAN ntDBTest(number a, const char *f, const int l, const coeffs r); 84 84 #else … … 193 193 const poly num = NUM(t); 194 194 assume(num != NULL); /**< t != 0 ==> numerator(t) != 0 */ 195 assume( _p_Test(num, ntRing,1) ); 195 196 p_Test(num, ntRing); 196 197 197 198 const poly den = DEN(t); … … 199 200 if (den != NULL) // !DENIS1(f) 200 201 { 201 assume( _p_Test(den, ntRing,1));202 p_Test(den, ntRing); 202 203 203 204 if(p_IsConstant(den, ntRing) && (n_IsOne(pGetCoeff(den), ntCoeffs))) … … 1760 1761 { 1761 1762 if (n_IsZero(a, src)) return NULL; 1762 assume(n_Test(a, src));1763 n_Test(a, src); 1763 1764 assume(src->rep == dst->extRing->cf->rep); 1764 1765 if ((SR_HDL(a) & SR_INT) || (a->s==3)) … … 1782 1783 { 1783 1784 if (n_IsZero(a, src)) return NULL; 1784 assume(n_Test(a, src));1785 n_Test(a, src); 1785 1786 nMapFunc nMap=n_SetMap(src,dst->extRing->cf); 1786 1787 poly p=p_NSet(nMap(a, src,dst->extRing->cf), dst->extRing); … … 1796 1797 { 1797 1798 if (n_IsZero(a, src)) return NULL; 1798 assume(n_Test(a, src));1799 n_Test(a, src); 1799 1800 /* mapping via intermediate int: */ 1800 1801 int n = n_Int(a, src); … … 1834 1835 COM(result) = COM(f); 1835 1836 //check_N((number)result,dst); 1836 assume(n_Test((number)result, dst));1837 n_Test((number)result, dst); 1837 1838 return (number)result; 1838 1839 } … … 1861 1862 COM(result) = COM(f); 1862 1863 //check_N((number)result,dst); 1863 assume(n_Test((number)result, dst));1864 n_Test((number)result, dst); 1864 1865 return (number)result; 1865 1866 } … … 1867 1868 number ntCopyAlg(number a, const coeffs cf, const coeffs dst) 1868 1869 { 1869 assume( n_Test(a, cf) );1870 n_Test(a, cf) ; 1870 1871 if (n_IsZero(a, cf)) return NULL; 1871 1872 return ntInit(prCopyR((poly)a, cf->extRing, dst->extRing),dst); … … 1874 1875 number ntGenAlg(number a, const coeffs cf, const coeffs dst) 1875 1876 { 1876 assume( n_Test(a, cf) );1877 n_Test(a, cf) ; 1877 1878 if (n_IsZero(a, cf)) return NULL; 1878 1879 … … 1884 1885 number ntMap0P(number a, const coeffs src, const coeffs dst) 1885 1886 { 1886 assume( n_Test(a, src) );1887 n_Test(a, src) ; 1887 1888 if (n_IsZero(a, src)) return NULL; 1888 1889 // int p = rChar(dst->extRing); … … 1899 1900 fraction f = (fraction)omAlloc0Bin(fractionObjectBin); 1900 1901 NUM(f) = g; // DEN(f) = NULL; COM(f) = 0; 1901 assume(n_Test((number)f, dst));1902 n_Test((number)f, dst); 1902 1903 //check_N((number)f,dst); 1903 1904 return (number)f; … … 1907 1908 number ntMapPP(number a, const coeffs src, const coeffs dst) 1908 1909 { 1909 assume( n_Test(a, src) );1910 n_Test(a, src) ; 1910 1911 if (n_IsZero(a, src)) return NULL; 1911 1912 assume(src == dst->extRing->cf); … … 1914 1915 fraction f = (fraction)omAlloc0Bin(fractionObjectBin); 1915 1916 NUM(f) = p; // DEN(f) = NULL; COM(f) = 0; 1916 assume(n_Test((number)f, dst));1917 n_Test((number)f, dst); 1917 1918 //check_N((number)f,dst); 1918 1919 return (number)f; … … 1922 1923 number ntMapUP(number a, const coeffs src, const coeffs dst) 1923 1924 { 1924 assume( n_Test(a, src) );1925 n_Test(a, src) ; 1925 1926 if (n_IsZero(a, src)) return NULL; 1926 1927 /* mapping via intermediate int: */ … … 1937 1938 fraction f = (fraction)omAlloc0Bin(fractionObjectBin); 1938 1939 NUM(f) = p; // DEN(f) = NULL; COM(f) = 0; 1939 assume(n_Test((number)f, dst));1940 n_Test((number)f, dst); 1940 1941 //check_N((number)f,dst); 1941 1942 return (number)f; -
libpolys/polys/kbuckets.cc
r4ec0f0 reb55f8a 92 92 { 93 93 assume(bucket->buckets[i]!=NULL); 94 _p_Test(bucket->coef[i],bucket->bucket_ring,PDEBUG);95 94 p_Test(bucket->coef[i],bucket->bucket_ring); 95 } 96 96 #endif 97 97 pFalseReturn(p_Test(bucket->buckets[i], bucket->bucket_ring)); -
libpolys/polys/monomials/p_polys.cc
r4ec0f0 reb55f8a 694 694 long p_DegW(poly p, const short *w, const ring R) 695 695 { 696 assume( p_Test(p, R));696 p_Test(p, R); 697 697 assume( w != NULL ); 698 698 long r=-LONG_MAX; … … 3882 3882 qq = p_PermPoly(zz, par_perm-1, srcExtRing, dst, nMap, NULL, rVar (srcExtRing)-1); 3883 3883 3884 assume (p_Test (qq, dst));3884 p_Test (qq, dst); 3885 3885 3886 3886 // poly p_PermPoly (poly p, int * perm, const ring oldRing, const ring dst, nMapFunc nMap, int *par_perm, int OldPar) … … 3922 3922 number n = nMap(p_GetCoeff(p, oldRing), oldRing->cf, dst->cf); 3923 3923 3924 assume (n_Test (n,dst->cf));3924 n_Test (n,dst->cf); 3925 3925 3926 3926 if ( nCoeff_is_algExt(dst->cf) ) -
libpolys/polys/monomials/p_polys.h
r4ec0f0 reb55f8a 245 245 if (p != NULL) 246 246 { 247 #ifdef PDEBUG248 247 p_Test(p, r); 249 #endif250 248 if (rOrd_SetCompRequiresSetm(r)) 251 249 { … … 806 804 static inline poly p_Copy(poly p, const ring r) 807 805 { 808 #ifdef PDEBUG 809 poly pp= r->p_Procs->p_Copy(p, r); 806 const poly pp = r->p_Procs->p_Copy(p, r); 810 807 p_Test(pp,r); 811 808 return pp; 812 #else813 return r->p_Procs->p_Copy(p, r);814 #endif815 809 } 816 810 … … 831 825 static inline poly p_Copy(poly p, const ring lmRing, const ring tailRing) 832 826 { 827 if (p != NULL) 828 { 833 829 #ifndef PDEBUG 834 if (tailRing == lmRing) 835 return tailRing->p_Procs->p_Copy(p, tailRing); 836 #endif 837 if (p != NULL) 838 { 830 if (tailRing == lmRing) 831 return tailRing->p_Procs->p_Copy(p, tailRing); 832 #endif 839 833 poly pres = p_Head(p, lmRing); 840 834 pNext(pres) = tailRing->p_Procs->p_Copy(pNext(p), tailRing); … … 848 842 static inline void p_Delete(poly *p, const ring r) 849 843 { 844 assume( p!= NULL ); 850 845 r->p_Procs->p_Delete(p, r); 851 846 } … … 853 848 static inline void p_Delete(poly *p, const ring lmRing, const ring tailRing) 854 849 { 850 assume( p!= NULL ); 851 if (*p != NULL) 852 { 855 853 #ifndef PDEBUG 856 if (tailRing == lmRing) 857 { 858 tailRing->p_Procs->p_Delete(p, tailRing); 859 return; 860 } 861 #endif 862 if (*p != NULL) 863 { 854 if (tailRing == lmRing) 855 { 856 p_Delete(p, tailRing); 857 return; 858 } 859 #endif 864 860 if (pNext(*p) != NULL) 865 tailRing->p_Procs->p_Delete(&pNext(*p), tailRing);861 p_Delete(&pNext(*p), tailRing); 866 862 p_LmDelete(p, lmRing); 867 863 } … … 911 907 #ifndef PDEBUG 912 908 if (lmRing == tailRing) 913 {914 909 return p_Mult_nn(p, n, tailRing); 915 }916 910 #endif 917 911 poly pnext = pNext(p); … … 1774 1768 { 1775 1769 if (p == NULL) return TRUE; 1770 p_Test(p, r); 1776 1771 return (pNext(p)==NULL) && p_LmIsConstantComp(p, r); 1777 1772 } … … 1779 1774 static inline BOOLEAN p_IsConstant(const poly p, const ring r) 1780 1775 { 1781 assume( p_Test(p, r) );1782 1776 if (p == NULL) return TRUE; 1777 p_Test(p, r); 1783 1778 return (pNext(p)==NULL) && p_LmIsConstant(p, r); 1784 1779 } … … 1787 1782 static inline BOOLEAN p_IsOne(const poly p, const ring R) 1788 1783 { 1789 assume( p_Test(p, R));1784 p_Test(p, R); 1790 1785 return (p_IsConstant(p, R) && n_IsOne(p_GetCoeff(p, R), R->cf)); 1791 1786 } … … 1793 1788 static inline BOOLEAN p_IsConstantPoly(const poly p, const ring r) 1794 1789 { 1790 p_Test(p, r); 1795 1791 poly pp=p; 1796 1792 while(pp!=NULL)
Note: See TracChangeset
for help on using the changeset viewer.