1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /* $Id: prProcs.h,v 1.3 2000-08-14 12:56:47 obachman Exp $ */ |
---|
5 | /* |
---|
6 | * ABSTRACT - Declaration of Routines for primitive poly arithmetic |
---|
7 | */ |
---|
8 | |
---|
9 | #include "polys.h" |
---|
10 | #include <omalloc.h> |
---|
11 | |
---|
12 | // just as macros, for the time being |
---|
13 | #define pr_Mult_n pr_Mult_n_General |
---|
14 | #define pr_Add_q pr_Add_q_General |
---|
15 | #define pr_Mult_m pr_Mult_m_General |
---|
16 | #define pr_Minus_m_Mult_q pr_Minus_m_Mult_q_General |
---|
17 | |
---|
18 | ///////////////////////////////////////////////////////////////////////// |
---|
19 | // Returns: p*n |
---|
20 | // Destroys: p |
---|
21 | // Const: n |
---|
22 | poly pr_Mult_n_General(poly p, number n); |
---|
23 | |
---|
24 | ///////////////////////////////////////////////////////////////////////// |
---|
25 | // Returns: p + q, *lp == pLength(p+q), p+q are from heap |
---|
26 | // Destroys: p, q |
---|
27 | // Assume: *lp == NULL || pLength(p) == *lp && pLength(q) == q |
---|
28 | // p, q are from heap |
---|
29 | poly pr_Add_q_General(poly p, poly q, |
---|
30 | int *lp = NULL, int lq = 0, |
---|
31 | ring r = currRing); |
---|
32 | |
---|
33 | |
---|
34 | ///////////////////////////////////////////////////////////////////////// |
---|
35 | // Returns: m*a1, newly allocated from heap |
---|
36 | // if spNoether != NULL, then monoms whioch are smaller |
---|
37 | // then spNoether are cut |
---|
38 | // Assume: m is Monom |
---|
39 | // Const: p, m |
---|
40 | poly pr_Mult_m_General(poly p, |
---|
41 | poly m, |
---|
42 | poly spNoether = NULL, |
---|
43 | ring r = currRing); |
---|
44 | |
---|
45 | ///////////////////////////////////////////////////////////////////////// |
---|
46 | // Return : p - m*q, allocated from heap |
---|
47 | // Assume: p is from heap, m is Monom |
---|
48 | // *lp == NULL || pLength(p) == *lp && pLenth(q) == lq |
---|
49 | // Destroy: p |
---|
50 | // Const: m, q |
---|
51 | poly pr_Minus_m_Mult_q_General(poly p, |
---|
52 | poly m, |
---|
53 | poly q, |
---|
54 | poly spNoether = NULL, |
---|
55 | int *lp = NULL, |
---|
56 | int lq = 0, |
---|
57 | ring r = currRing); |
---|
58 | |
---|
59 | |
---|