1 | #ifndef SIMPLEIDEALS_H |
---|
2 | #define SIMPLEIDEALS_H |
---|
3 | /**************************************** |
---|
4 | * Computer Algebra System SINGULAR * |
---|
5 | ****************************************/ |
---|
6 | /* $Id$ */ |
---|
7 | /* |
---|
8 | * ABSTRACT - all basic methods to manipulate ideals |
---|
9 | */ |
---|
10 | #include <polys/monomials/ring.h> |
---|
11 | |
---|
12 | #ifdef PDEBUG |
---|
13 | ideal idDBInit (int size, int rank, const char *f, int l); |
---|
14 | #define idInit(A,B) idDBInit(A,B,__FILE__,__LINE__) |
---|
15 | #else |
---|
16 | /*- creates an ideal -*/ |
---|
17 | ideal idInit (int size, int rank=1); |
---|
18 | #endif |
---|
19 | /*- deletes an ideal -*/ |
---|
20 | #define idDelete(h) id_Delete(h, currRing) |
---|
21 | void id_Delete (ideal* h, ring r); |
---|
22 | void id_ShallowDelete (ideal* h, ring r); |
---|
23 | void idSkipZeroes (ideal ide); |
---|
24 | /*gives an ideal the minimal possible size*/ |
---|
25 | |
---|
26 | #ifdef PDEBUG |
---|
27 | void idDBTest(ideal h1, int level, const char *f,const int l); |
---|
28 | #define idTest(A) idDBTest(A, PDEBUG, __FILE__,__LINE__) |
---|
29 | #define idPrint(id) idShow(id) |
---|
30 | #else |
---|
31 | #define idTest(A) (TRUE) |
---|
32 | #define idPrint(A) ((void)0) |
---|
33 | #endif |
---|
34 | |
---|
35 | ideal id_Copy (ideal h1,const ring r); |
---|
36 | #ifdef PDEBUG |
---|
37 | ideal idDBCopy(ideal h1,const char *f,int l); |
---|
38 | #define idCopy(A) idDBCopy(A,__FILE__,__LINE__) |
---|
39 | #else |
---|
40 | #define idCopy(A) id_Copy(A,currRing) |
---|
41 | #endif |
---|
42 | /*adds two ideals without simplifying the result*/ |
---|
43 | ideal idSimpleAdd (ideal h1,ideal h2); |
---|
44 | /*adds the quotient ideal*/ |
---|
45 | ideal idAdd (ideal h1,ideal h2); |
---|
46 | /* h1 + h2 */ |
---|
47 | BOOLEAN idIs0 (ideal h); |
---|
48 | |
---|
49 | long id_RankFreeModule(ideal m, ring lmRing, ring tailRing); |
---|
50 | static inline long id_RankFreeModule(ideal m, ring r) |
---|
51 | {return id_RankFreeModule(m, r, r);} |
---|
52 | // returns TRUE, if idRankFreeModule(m) > 0 |
---|
53 | BOOLEAN id_IsModule(ideal m, ring r); |
---|
54 | ideal idFreeModule (int i); |
---|
55 | int idElem(const ideal F); |
---|
56 | #endif |
---|