source: git/Singular/janet.h @ 47367fd

spielwiese
Last change on this file since 47367fd was 0fb34ba, checked in by Hans Schoenemann <hannes@…>, 13 years ago
start with dir Singular: fix includes and makefile
  • Property mode set to 100644
File size: 2.1 KB
Line 
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
14typedef struct
15{
16  poly root; //poly for parent, NULL for prol
17  kBucket_pt root_b;
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
26typedef void (*poly_function)(Poly *);
27
28ListNode
29{
30 Poly *info;
31 ListNode *next;
32};
33
34typedef struct
35{
36 ListNode *root;
37} jList;
38
39NodeM
40{
41 NodeM *left,*right;
42 Poly *ended;
43};
44
45TreeM
46{
47 NodeM *root;
48};
49
50typedef ListNode* LCI;
51typedef ListNode** LI;
52
53//-------FUNCS----------
54Poly* FindMinList(jList *);
55void DestroyTree(NodeM *);
56NodeM* create();
57void ForEach(TreeM *,poly_function);
58void ControlProlong(Poly *);
59Poly* is_div_(TreeM *root, poly item);
60void insert_(TreeM **tree, Poly *item);
61Poly* NewPoly(poly p=NULL);
62void DestroyPoly();
63
64void NFL(Poly *,TreeM *);
65void PNF(Poly *,TreeM *);
66void ClearProl(Poly *x, int i);
67void InitProl(Poly *p);
68void InitHistory(Poly *p);
69Poly *is_present(jList *,poly);
70int GetMult(Poly *,int);
71int GB_length();
72
73void InsertInList(jList *,Poly *);
74void ForEachPNF(jList *,int);
75void ClearMult(Poly *,int);
76void ProlVar(Poly *,int);
77void SetMult(Poly *,int);
78void InitLead(Poly *);
79void InsertInCount(jList *,Poly *);
80int GetProl(Poly *, int);
81void SetProl(Poly *, int);
82int ProlCompare(Poly *, Poly *);
83int ValidatePoly(Poly *,TreeM *);
84int ListGreatMoveDegree(jList *,jList *,poly);
85int ListGreatMoveOrder(jList *,jList *,poly);
86void ForEachControlProlong(jList *);
87void NFListQ();
88int CountList(jList *);
89void DestroyList(jList *);
90
91int ReducePoly(Poly *x,Poly *y);
92int ReducePolyLead(Poly *x,Poly *y);
93void Define(TreeM **G);
94ListNode* CreateListNode(Poly *x);
95void DestroyListNode(ListNode *x);
96void DestroyFreeNodes();
97
98BOOLEAN jjJanetBasis(leftv res, leftv v);
99BOOLEAN jjStdJanetBasis(leftv res, leftv v,int flag); // 0: JB, 1: SB
100
101#endif //JANET_INTERFACE
Note: See TracBrowser for help on using the repository browser.