source: git/libpolys/polys/simpleideals.h @ f71e8c5

spielwiese
Last change on this file since f71e8c5 was f71e8c5, checked in by Hans Schoenemann <hannes@…>, 13 years ago
same missing include for simpleideals.* removed std stuff from simpleideals.cc
  • Property mode set to 100644
File size: 2.4 KB
Line 
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#include <omalloc/omalloc.h>
12
13struct sip_sideal
14{
15  poly*  m;
16  long rank;
17  int nrows;
18  int ncols;
19  #define IDELEMS(i) ((i)->ncols)
20  #define MATCOLS(i) ((i)->ncols)
21  #define MATROWS(i) ((i)->nrows)
22  #define MATELEM(mat,i,j) ((mat)->m)[MATCOLS((mat)) * ((i)-1) + (j)-1]
23   
24};
25
26struct sip_smap
27{
28  poly *m;
29  char *preimage;
30  int nrows;
31  int ncols;
32};
33
34class ip_smatrix;
35typedef ip_smatrix *       matrix;
36
37struct sideal_list;
38typedef struct sideal_list *      ideal_list;
39
40struct sideal_list
41{
42  ideal_list next;
43  ideal      d;
44#ifndef NDEBUG
45  int nr;
46#endif
47};
48
49extern omBin sip_sideal_bin;
50
51#ifdef PDEBUG
52ideal idDBInit (int size, int rank, const char *f, int l);
53#define idInit(A,B) idDBInit(A,B,__FILE__,__LINE__)
54#else
55/*- creates an ideal -*/
56ideal idInit (int size, int rank=1);
57#endif
58/*- deletes an ideal -*/
59#define idDelete(h) id_Delete(h, currRing)
60void id_Delete (ideal* h, ring r);
61void id_ShallowDelete (ideal* h, ring r);
62void idSkipZeroes (ideal ide);
63  /*gives an ideal the minimal possible size*/
64
65#ifdef PDEBUG
66void id_DBTest(ideal h1, int level, const char *f,const int l, const ring r);
67#define id_Test(A, r) id_DBTest(A, PDEBUG, __FILE__,__LINE__, r)
68// #define id_Print(id, r) id_Show(id, r)
69#else
70#define id_Test(A, r)  (TRUE)
71// #define id_Print(A, r) ((void)0)
72#endif
73
74ideal id_Copy (ideal h1,const ring r);
75#ifdef PDEBUG
76ideal idDBCopy(ideal h1,const char *f,int l);
77#define idCopy(A) idDBCopy(A,__FILE__,__LINE__)
78#else
79#define idCopy(A) id_Copy(A,currRing)
80#endif
81  /*adds two ideals without simplifying the result*/
82ideal idSimpleAdd (ideal h1,ideal h2);
83  /*adds the quotient ideal*/
84ideal idAdd (ideal h1,ideal h2);
85  /* h1 + h2 */
86BOOLEAN idIs0 (ideal h);
87
88long id_RankFreeModule(ideal m, ring lmRing, ring tailRing);
89static inline long id_RankFreeModule(ideal m, ring r)
90{return id_RankFreeModule(m, r, r);}
91// returns TRUE, if idRankFreeModule(m) > 0
92BOOLEAN id_IsModule(ideal m, ring r);
93ideal   idFreeModule (int i);
94int     idElem(const ideal F);
95int id_PosConstant(ideal id, const ring r);
96ideal id_MaxIdeal (const ring r);
97ideal id_CopyFirstK (const ideal ide, const int k,const ring r);
98#endif
Note: See TracBrowser for help on using the repository browser.