Changeset 1ca2af in git
- Timestamp:
- Sep 9, 2016, 3:32:25 PM (7 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
- Children:
- 43fbe81b86fe54b355223a6f9816365e92f73b93551a9120fd6fbba9a370f8ea17855840e2bafafd
- Parents:
- dd930e594c1cd299f2e2b78fe5444de64aede28a
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/ideals.cc
rdd930e5 r1ca2af 2541 2541 } 2542 2542 2543 /*2544 * compare the leading terms of a and b2545 */2546 static int tCompare(const poly a, const poly b)2547 {2548 if (b == NULL) return(a != NULL);2549 if (a == NULL) return(-1);2550 2551 /* a != NULL && b != NULL */2552 int r = pLmCmp(a, b);2553 if (r != 0) return(r);2554 number h = nSub(pGetCoeff(a), pGetCoeff(b));2555 r = -1 + nIsZero(h) + 2*nGreaterZero(h); /* -1: <, 0:==, 1: > */2556 nDelete(&h);2557 return(r);2558 }2559 2560 /*2561 * compare a and b (rev-lex on terms)2562 */2563 static int pCompare(const poly a, const poly b)2564 {2565 int r = tCompare(a, b);2566 if (r != 0) return(r);2567 2568 poly aa = a;2569 poly bb = b;2570 while (r == 0 && aa != NULL && bb != NULL)2571 {2572 pIter(aa);2573 pIter(bb);2574 r = tCompare(aa, bb);2575 }2576 return(r);2577 }2578 2579 2543 typedef struct 2580 2544 { … … 2585 2549 int pCompare_qsort(const void *a, const void *b) 2586 2550 { 2587 int res = p Compare(((poly_sort *)a)->p, ((poly_sort *)b)->p);2551 int res = p_Compare(((poly_sort *)a)->p, ((poly_sort *)b)->p,currRing); 2588 2552 return(res); 2589 2553 } -
kernel/ideals.h
rdd930e5 r1ca2af 187 187 ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing); // image of certain map for BGG 188 188 189 190 189 #endif
Note: See TracChangeset
for help on using the changeset viewer.