1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id: prCopy.h,v 1.1 1999-11-15 17:20:42 obachman Exp $ */ |
---|
5 | /* |
---|
6 | * ABSTRACT - declarations of functions for Copy/Move/Delete for Polys |
---|
7 | */ |
---|
8 | |
---|
9 | |
---|
10 | /************************************************************************* |
---|
11 | * |
---|
12 | * MoveR, CopyR, DeleteR, HeadR, SortR |
---|
13 | * Assume: ideal/poly from ring r |
---|
14 | * Coef(r) == Coef(currRing) |
---|
15 | * Move, Delete: input object is destroyed and set to NULL |
---|
16 | * |
---|
17 | * Sort: revert == TRUE is faster for polys which are almost sorted correctly |
---|
18 | * |
---|
19 | ************************************************************************/ |
---|
20 | poly prMoveR_NoSort(poly &p, ring r); |
---|
21 | poly prMoveR(poly &p, ring r); |
---|
22 | poly prCopyR_NoSort(poly p, ring r); |
---|
23 | poly prCopyR(poly p, ring r); |
---|
24 | poly prHeadR(poly p, ring r); |
---|
25 | void prDeleteR(poly &p, ring r); |
---|
26 | poly prSortR(poly p, ring r, BOOLEAN revert = TRUE); |
---|
27 | poly prMergeR(poly p1, poly p2, ring r); |
---|
28 | |
---|
29 | ideal idrMoveR_NoSort(ideal &id, ring r); |
---|
30 | ideal idrMoveR(ideal &id, ring r); |
---|
31 | ideal idrCopyR_NoSort(ideal id, ring r); |
---|
32 | ideal idrCopyR(ideal id, ring r); |
---|
33 | ideal idrHeadR(ideal id, ring r); |
---|
34 | void idrDeleteR(ideal &id, ring r); |
---|
35 | |
---|
36 | /************************************************************************* |
---|
37 | * |
---|
38 | * Copy, Delete, Sort |
---|
39 | * |
---|
40 | *************************************************************************/ |
---|
41 | |
---|
42 | inline poly pSort(poly p, BOOLEAN revert = TRUE) |
---|
43 | { |
---|
44 | return prSortR(p, currRing, revert); |
---|
45 | } |
---|
46 | |
---|
47 | inline poly pMerge(poly p1, poly p2) |
---|
48 | { |
---|
49 | return prMergeR(p1, p2, currRing); |
---|
50 | } |
---|
51 | |
---|
52 | /************************************************************************* |
---|
53 | * |
---|
54 | * Specialized sort routines |
---|
55 | * |
---|
56 | *************************************************************************/ |
---|
57 | // TBC: |
---|
58 | // Assume: If considerd only as poly in any component of p |
---|
59 | // (say, monomials of other components of p are set to 0), |
---|
60 | // then p is already sorted correctly |
---|
61 | #define pSortCompCorrect(p) pSort(p, TRUE) |
---|
62 | |
---|
63 | |
---|