source: git/Singular/kbPolyProcs.h @ c232af

spielwiese
Last change on this file since c232af was c232af, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* omalloc stuff git-svn-id: file:///usr/local/Singular/svn/trunk@4524 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.5 KB
Line 
1#ifndef KBPOLYPROCS_H
2#define KBPOLYPROCS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id: kbPolyProcs.h,v 1.6 2000-08-14 12:56:29 obachman Exp $ */
7#include "ring.h"
8#include "kutil.h"
9
10
11///////////////////////////////////////////////////////////////////////
12///
13/// Procedures for spolys and poly reductions
14///
15typedef void (*kb_n_Mult_p_Proc)(number n, poly p);
16extern void kb_n_Mult_p_General(number n, poly p);
17
18typedef void (*kb_p_Add_q_Proc)(poly *p, int *lp,
19                                poly* q, int* lq,
20                                omBin heap = NULL);
21extern void kb_p_Add_q_General(poly *p, int *lp,
22                               poly *q, int *lq,
23                               omBin heap = NULL);
24
25typedef poly (*kb_p_Mult_m_Proc)(poly p,
26                                 poly m,
27                                 poly spNoether,
28                                 omBin heap = NULL);
29extern poly  kb_p_Mult_m_General(poly p,
30                                 poly m,
31                                 poly spNoether,
32                                 omBin heap = NULL);
33
34typedef void (*kb_p_Minus_m_Mult_q_Proc)(poly *p, int *lp,
35                                         poly m,
36                                         poly q, int lq,
37                                         poly spNoether,
38                                         omBin heap = NULL);
39extern void kb_p_Minus_m_Mult_q_General(poly *p, int *lp,
40                                        poly m,
41                                        poly q, int lq,
42                                        poly spNoether,
43                                        omBin heap = NULL);
44
45typedef struct skbPolyProcs kbPolyProcs;
46typedef kbPolyProcs * kbPolyProcs_pt;
47struct skbPolyProcs
48{
49  kb_n_Mult_p_Proc          n_Mult_p;
50  kb_p_Add_q_Proc           p_Add_q;
51  kb_p_Mult_m_Proc          p_Mult_m;
52  kb_p_Minus_m_Mult_q_Proc  p_Minus_m_Mult_q;
53};
54
55extern void kbSetPolyProcs(kbPolyProcs_pt procs,
56                           // should be rGetOrderType(r), unless you
57                           // know better (e.g., for syz or schreyer
58                           // ordering, or if you know that components
59                           // are not involved)
60                           ring r,
61                           rOrderType_t ot = rOrderType_General,
62                           BOOLEAN homog = FALSE);
63
64
65#define kb_n_Mult_p kb_n_Mult_p_General
66#define kb_p_Add_q  kb_p_Add_q_General
67#define kb_p_Minus_m_Mult_q  kb_p_Minus_m_Mult_q_General
68#define kb_p_Mult_m kb_p_Mult_m_General
69
70///////////////////////////////////////////////////////////////////////
71///
72/// General Procedures for poly arithemetic which always work
73///
74void kb_n_Mult_p_General(number n, poly p);
75void kb_p_Add_q_General(poly *p, int *lp,
76                        poly *q, int *lq,
77                        omBin heap = NULL);
78poly  kb_p_Mult_m_General(poly p,
79                          poly m,
80                          poly spNoether = NULL,
81                          omBin heap = NULL);
82void kb_p_Minus_m_Mult_q_General (poly *pp, int *lpp,
83                                  poly m,
84                                  poly q, int lq,
85                                  poly spNoether = NULL,
86                                  omBin heap = NULL);
87
88
89void kbCreateSpoly(LObject* P,
90                   poly spNoether = NULL);
91
92
93void kbReducePoly(LObject* RP, // Poly to be reduced
94                  TObject* WP, // Poly with which is reduced
95                  poly spNoether = NULL);
96
97
98#endif /* KBPOLYPROCS_H */
Note: See TracBrowser for help on using the repository browser.