Changeset 722db6 in git
- Timestamp:
- Dec 2, 2010, 5:07:36 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- ffe4fd8760d02e6be0620d213646ceeb9a2c4e18
- Parents:
- 66bff8383ec423ff4d78015828b80285a4d2888a
- Location:
- kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kbuckets.cc
r66bff8 r722db6 1014 1014 // But better declare it extern than including polys.h 1015 1015 extern void pTakeOutComp(poly *p, long comp, poly *q, int *lq); 1016 void pDecrOrdTakeOutComp(poly *p, long comp, long order,1017 poly *q, int *lq);1018 1016 1019 1017 void kBucketTakeOutComp(kBucket_pt bucket, … … 1050 1048 1051 1049 kbTest(bucket); 1052 }1053 1054 void kBucketDecrOrdTakeOutComp(kBucket_pt bucket,1055 long comp, long order,1056 poly *r_p, int *l)1057 {1058 poly p = NULL, q;1059 int i, lp = 0, lq;1060 1061 #ifndef HAVE_PSEUDO_BUCKETS1062 kBucketMergeLm(bucket);1063 for (i=1; i<=bucket->buckets_used; i++)1064 {1065 if (bucket->buckets[i] != NULL)1066 {1067 MULTIPLY_BUCKET(bucket,i);1068 pDecrOrdTakeOutComp(&(bucket->buckets[i]), comp, order, &q, &lq);1069 if (q != NULL)1070 {1071 bucket->buckets_length[i] -= lq;1072 p = p_Add_q(p, q, lp, lq, bucket->bucket_ring);1073 }1074 }1075 }1076 kBucketAdjustBucketsUsed(bucket);1077 #else1078 pDecrOrdTakeOutComp(&(bucket->p), comp, order, &p, &lp);1079 (bucket->l) -= lp;1080 #endif1081 1082 *r_p = p;1083 *l = lp;1084 1050 } 1085 1051 -
kernel/kbuckets.h
r66bff8 r722db6 100 100 poly *p, int *l); 101 101 102 // Here we only extract such monoms which have component == comp and103 // degree == order104 // ASSUME: monomial ordering is Order compatible, i.e., if m1, m2 Monoms then105 // m1 >= m2 ==> pGetOrder(m1) >= pGetOrder(m2)106 void kBucketDecrOrdTakeOutComp(kBucket_pt bucket,107 long comp, long order,108 poly *p, int *l);109 110 102 ////////////////////////////////////////////////////////////////////////// 111 103 /// -
kernel/polys.cc
r66bff8 r722db6 465 465 pTest(*r_p); 466 466 pTest(*r_q); 467 }468 469 void pDecrOrdTakeOutComp(poly *r_p, long comp, long order,470 poly *r_q, int *lq)471 {472 spolyrec pp, qq;473 poly p, q, p_prev;474 int l = 0;475 476 pNext(&pp) = *r_p;477 p = *r_p;478 p_prev = &pp;479 q = &qq;480 481 #ifdef HAVE_ASSUME482 if (p != NULL)483 {484 while (pNext(p) != NULL)485 {486 assume(pGetOrder(p) >= pGetOrder(pNext(p)));487 pIter(p);488 }489 }490 p = *r_p;491 #endif492 493 while (p != NULL && pGetOrder(p) > order) pIter(p);494 495 while(p != NULL && pGetOrder(p) == order)496 {497 while (pGetComp(p) == comp)498 {499 pNext(q) = p;500 pIter(q);501 pIter(p);502 pSetComp(p, 0);503 pSetmComp(p);504 l++;505 if (p == NULL || pGetOrder(p) != order)506 {507 pNext(p_prev) = p;508 goto Finish;509 }510 }511 pNext(p_prev) = p;512 p_prev = p;513 pIter(p);514 }515 516 Finish:517 pNext(q) = NULL;518 *r_p = pNext(&pp);519 *r_q = pNext(&qq);520 *lq = l;521 467 } 522 468
Note: See TracChangeset
for help on using the changeset viewer.