Loading...
Searching...
No Matches
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 19 of file pp_Mult_mm_Noether__T.cc.

{
p_Test(p, ri);
p_LmTest(m, ri);
assume(spNoether != NULL);
if (p == NULL)
{
ll = 0;
return NULL;
}
spolyrec rp;
poly q = &rp, r;
number n;
const unsigned long *spNoether_exp = spNoether->exp;
number ln = pGetCoeff(m);
omBin bin = ri->PolyBin;
DECLARE_LENGTH(const unsigned long length = ri->ExpL_Size);
DECLARE_ORDSGN(const long* ordsgn = ri->ordsgn);
const unsigned long* m_e = m->exp;
pAssume(!n_IsZero__T(ln,ri->cf));
pAssume1(p_GetComp(m, ri) == 0 || p_MaxComp(p, ri) == 0);
int l = 0;
do
{
p_AllocBin(r, bin, ri);
p_MemSum__T(r->exp, p->exp, m_e, length);
p_MemAddAdjust__T(r, ri);
p_MemCmp__T(r->exp, spNoether_exp, length, ordsgn, goto Continue, goto Continue, goto Break);
Break:
p_FreeBinAddr(r, ri);
break;
Continue:
n = n_Mult__T(ln, pGetCoeff(p), ri->cf);
#ifdef HAVE_RINGS
if(n_IsZero__T(n, ri->cf))
{
n_Delete__T(&n, ri->cf);
p_FreeBinAddr(r, ri);
} else
#endif
{
l++;
q = pNext(q) = r;
pSetCoeff0(q, n);
}
pIter(p);
} while (p != NULL);
if (ll < 0)
ll = l;
else
ll = pLength(p);
pNext(q) = NULL;
p_Test(pNext(&rp), ri);
return pNext(&rp);
}
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
p
int p
Definition cfModGcd.cc:4086
length
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
assume
#define assume(x)
Definition mod2.h:389
p_FreeBinAddr
#define p_FreeBinAddr(p, r)
Definition monomials.h:217
p_GetComp
#define p_GetComp(p, r)
Definition monomials.h:64
spolyrec::exp
unsigned long exp[1]
Definition monomials.h:26
pIter
#define pIter(p)
Definition monomials.h:37
pNext
#define pNext(p)
Definition monomials.h:36
pAssume1
#define pAssume1(cond)
Definition monomials.h:171
pSetCoeff0
#define pSetCoeff0(p, n)
Definition monomials.h:59
p_AllocBin
#define p_AllocBin(p, bin, r)
Definition monomials.h:210
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:44
pAssume
#define pAssume(cond)
Definition monomials.h:90
spolyrec
Definition monomials.h:23
NULL
#define NULL
Definition omList.c:12
omBin
omBin_t * omBin
Definition omStructs.h:12
n_Delete__T
#define n_Delete__T(n, r)
Definition p_polys.cc:5042
pLength
static int pLength(poly a)
Definition p_polys.h:190
p_MaxComp
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
Definition p_polys.h:294
p_LmTest
#define p_LmTest(p, r)
Definition p_polys.h:162
p_Test
#define p_Test(p, r)
Definition p_polys.h:161