My Project  UNKNOWN_GIT_VERSION
Functions
pp_Mult_mm_Noether__T.cc File Reference

Go to the source code of this file.

Functions

LINKAGE poly pp_Mult_mm_Noether__T (poly p, const poly m, const poly spNoether, int &ll, const ring ri)
 

Function Documentation

◆ pp_Mult_mm_Noether__T()

LINKAGE poly pp_Mult_mm_Noether__T ( poly  p,
const poly  m,
const poly  spNoether,
int &  ll,
const ring  ri 
)

Definition at line 16 of file pp_Mult_mm_Noether__T.cc.

16  : p, m
17  *
18  ***************************************************************/
19 LINKAGE poly pp_Mult_mm_Noether__T(poly p, const poly m, const poly spNoether, int &ll, const ring ri)
20 {
21  p_Test(p, ri);
22  p_LmTest(m, ri);
23  assume(spNoether != NULL);
24  if (p == NULL)
25  {
26  ll = 0;
27  return NULL;
28  }
29  spolyrec rp;
30  poly q = &rp, r;
31  number n;
32  const unsigned long *spNoether_exp = spNoether->exp;
33  number ln = pGetCoeff(m);
34  omBin bin = ri->PolyBin;
35  DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size);
36  DECLARE_ORDSGN(const long* ordsgn = ri->ordsgn);
37  const unsigned long* m_e = m->exp;
38  pAssume(!n_IsZero__T(ln,ri->cf));
39  pAssume1(p_GetComp(m, ri) == 0 || p_MaxComp(p, ri) == 0);
40  int l = 0;
41 
42  do
43  {
44  p_AllocBin(r, bin, ri);
45  p_MemSum__T(r->exp, p->exp, m_e, length);
46  p_MemAddAdjust__T(r, ri);
47 
48  p_MemCmp__T(r->exp, spNoether_exp, length, ordsgn, goto Continue, goto Continue, goto Break);
49 
50  Break:
51  p_FreeBinAddr(r, ri);
52  break;
53 
54  Continue:
55 
56  n = n_Mult__T(ln, pGetCoeff(p), ri->cf);
57 
58  #ifdef HAVE_RINGS
59  if(n_IsZero__T(n, ri->cf))
60  {
61  n_Delete__T(&n, ri->cf);
62  p_FreeBinAddr(r, ri);
63  } else
64  #endif
65  {
66  l++;
67  q = pNext(q) = r;
68  pSetCoeff0(q, n);
69  }
70 
71  pIter(p);
72 
73  } while (p != NULL);
74 
75  if (ll < 0)
76  ll = l;
77  else
78  ll = pLength(p);
79 
80  pNext(q) = NULL;
81 
p_GetComp
#define p_GetComp(p, r)
Definition: monomials.h:62
pAssume
#define pAssume(cond)
Definition: monomials.h:87
length
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:263
p_Test
#define p_Test(p, r)
Definition: p_polys.h:156
pLength
static unsigned pLength(poly a)
Definition: p_polys.h:184
pIter
#define pIter(p)
Definition: monomials.h:35
spolyrec
Definition: monomials.h:21
n_Delete__T
#define n_Delete__T(n, r)
Definition: p_polys.cc:4790
p_LmTest
#define p_LmTest(p, r)
Definition: p_polys.h:157
p_FreeBinAddr
#define p_FreeBinAddr(p, r)
Definition: monomials.h:249
omBin
omBin_t * omBin
Definition: omStructs.h:11
pAssume1
#define pAssume1(cond)
Definition: monomials.h:168
pp_Mult_mm_Noether__T
LINKAGE poly pp_Mult_mm_Noether__T(poly p, const poly m, const poly spNoether, int &ll, const ring ri)
Definition: pp_Mult_mm_Noether__T.cc:16
pSetCoeff0
#define pSetCoeff0(p, n)
Definition: monomials.h:57
m
int m
Definition: cfEzgcd.cc:121
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:9
l
int l
Definition: cfEzgcd.cc:93
p
int p
Definition: cfModGcd.cc:4019
p_AllocBin
#define p_AllocBin(p, bin, r)
Definition: monomials.h:242
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:42
spolyrec::exp
unsigned long exp[1]
Definition: monomials.h:25
LINKAGE
#define LINKAGE
Definition: mod2.h:137
p_MaxComp
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
Definition: p_polys.h:284
pNext
#define pNext(p)
Definition: monomials.h:34