janet.h
Go to the documentation of this file.
1 #ifndef __JANET_INTERFACE__
2 #define __JANET_INTERFACE__
3 
4 #include <kernel/structs.h>
5 
6 #define GCM(sz) omAlloc((sz))
7 #define GCMA(sz) omAlloc((sz))
8 #define GCF(x) omFree((x))
9 
10 #define ListNode struct LISTNODE
11 #define TreeM struct TREEM
12 #define NodeM struct NODEM
13 
14 typedef struct
15 {
16  poly root; //poly for parent, NULL for prol
18  int root_l;
19  poly history; //parent
20  poly lead; //leading monomial for prolongation
21  char *mult; //[multi].[prol]
22  int changed;
23  int prolonged; //number of prolonged variable for prolongation, otherwise = -1;
24 } Poly;
25 
26 typedef void (*poly_function)(Poly *);
27 
29 {
32 };
33 
34 typedef struct
35 {
37 } jList;
38 
39 NodeM
40 {
41  NodeM *left,*right;
43 };
44 
45 TreeM
46 {
47  NodeM *root;
48 };
49 
50 typedef ListNode* LCI;
51 typedef ListNode** LI;
52 
53 //-------FUNCS----------
55 void DestroyTree(NodeM *);
56 NodeM* create();
57 //void ForEach(TreeM *,poly_function);
58 void ControlProlong(Poly *);
59 Poly* is_div_(TreeM *root, poly item);
60 void insert_(TreeM **tree, Poly *item);
62 void DestroyPoly();
63 
64 void NFL(Poly *,TreeM *);
65 void PNF(Poly *,TreeM *);
66 void ClearProl(Poly *x, int i);
67 void InitProl(Poly *p);
68 void InitHistory(Poly *p);
70 int GetMult(Poly *,int);
71 int GB_length();
72 
73 void InsertInList(jList *,Poly *);
74 void ForEachPNF(jList *,int);
75 void ClearMult(Poly *,int);
76 void ProlVar(Poly *,int);
77 void SetMult(Poly *,int);
78 void InitLead(Poly *);
79 void InsertInCount(jList *,Poly *);
80 int GetProl(Poly *, int);
81 void SetProl(Poly *, int);
82 int ProlCompare(Poly *, Poly *);
83 int ValidatePoly(Poly *,TreeM *);
87 void NFListQ();
88 int CountList(jList *);
89 void DestroyList(jList *);
90 
91 int ReducePoly(Poly *x,Poly *y);
92 int ReducePolyLead(Poly *x,Poly *y);
93 void Define(TreeM **G);
96 void DestroyFreeNodes();
97 
98 int ComputeBasis(jList *,jList *);
99 void Initialization(char *);
100 
101 #endif //JANET_INTERFACE
ListNode * root
Definition: janet.h:36
int CountList(jList *)
Definition: janet.cc:624
kBucket_pt root_b
Definition: janet.h:17
const CanonicalForm int const CFList const Variable & y
Definition: facAbsFact.cc:57
void ForEachPNF(jList *, int)
Definition: janet.cc:699
ListNode * LCI
Definition: janet.h:48
int ProlCompare(Poly *, Poly *)
Definition: janet.cc:470
int root_l
Definition: janet.h:18
Poly * ended
Definition: janet.h:42
void Define(TreeM **G)
Definition: janet.cc:822
int GetProl(Poly *, int)
Definition: janet.cc:443
return P p
Definition: myNF.cc:203
void InitHistory(Poly *p)
Definition: janet.cc:409
void insert_(TreeM **tree, Poly *item)
Definition: janet.cc:919
void SetProl(Poly *, int)
Definition: janet.cc:448
ListNode Poly * info
Definition: janet.h:30
void InsertInList(jList *, Poly *)
Definition: janet.cc:559
int GetMult(Poly *, int)
Definition: janet.cc:428
int ValidatePoly(Poly *, TreeM *)
Definition: janet.cc:306
static TreeM * G
Definition: janet.cc:38
Definition: janet.h:34
void NFL(Poly *, TreeM *)
Definition: janet.cc:195
void ProlVar(Poly *, int)
Definition: janet.cc:487
Poly * FindMinList(jList *)
Definition: janet.cc:524
void InsertInCount(jList *, Poly *)
Definition: janet.cc:578
int GB_length()
Definition: janet.cc:747
Poly * NewPoly(poly p=NULL)
Definition: janet.cc:368
int changed
Definition: janet.h:22
void PNF(Poly *, TreeM *)
Definition: janet.cc:151
char * mult
Definition: janet.h:21
int ComputeBasis(jList *, jList *)
Definition: janet.cc:1007
Poly * is_present(jList *, poly)
Definition: janet.cc:736
#define NodeM
Definition: janet.h:12
Definition: janet.h:14
poly lead
Definition: janet.h:20
Poly * is_div_(TreeM *root, poly item)
Definition: janet.cc:860
void NFListQ()
Definition: janet.cc:638
int i
Definition: cfEzgcd.cc:123
int ListGreatMoveDegree(jList *, jList *, poly)
Definition: janet.cc:606
void(* poly_function)(Poly *)
Definition: janet.h:26
void ClearProl(Poly *x, int i)
Definition: janet.cc:453
void ForEachControlProlong(jList *)
Definition: janet.cc:710
void InitProl(Poly *p)
Definition: janet.cc:423
#define TreeM
Definition: janet.h:11
NodeM * create()
Definition: janet.cc:764
void DestroyTree(NodeM *)
Definition: janet.cc:811
#define NULL
Definition: omList.c:10
void InitLead(Poly *)
Definition: janet.cc:416
ListNode ** LI
Definition: janet.h:51
poly history
Definition: janet.h:19
int ReducePolyLead(Poly *x, Poly *y)
Definition: janet.cc:81
int prolonged
Definition: janet.h:23
Variable x
Definition: cfModGcd.cc:4023
void ControlProlong(Poly *)
Definition: janet.cc:399
int ReducePoly(Poly *x, Poly *y)
void SetMult(Poly *, int)
Definition: janet.cc:433
void Initialization(char *)
Definition: janet.cc:959
void DestroyPoly()
ListNode * CreateListNode(Poly *x)
Definition: janet.cc:515
polyrec * poly
Definition: hilb.h:10
poly root
Definition: janet.h:16
#define ListNode
Definition: janet.h:10
void DestroyList(jList *)
Definition: janet.cc:721
int ListGreatMoveOrder(jList *, jList *, poly)
Definition: janet.cc:589
void DestroyFreeNodes()
Definition: janet.cc:783
ListNode * next
Definition: janet.h:31
void DestroyListNode(ListNode *x)
Definition: janet.cc:509
void ClearMult(Poly *, int)
Definition: janet.cc:438