My Project
debian-1:4.1.1-p2+ds-4
libpolys
polys
templates
Functions
p_Mult_nn__T.cc File Reference
Go to the source code of this file.
Functions
LINKAGE
poly
p_Mult_nn__T
(poly
p
,
const
number n,
const
ring r)
Function Documentation
◆
p_Mult_nn__T()
LINKAGE
poly p_Mult_nn__T
(
poly
p
,
const
number
n
,
const
ring
r
)
Definition at line
15
of file
p_Mult_nn__T.cc
.
15
: n
16
*
17
***************************************************************/
18
LINKAGE
poly
p_Mult_nn__T
(poly
p
,
const
number n,
const
ring r)
19
{
20
pAssume
(!n_IsZero__T(n,r->cf));
21
p_Test
(
p
, r);
22
23
poly q =
p
;
24
#ifdef HAVE_ZERODIVISORS
25
poly old =
NULL
;
26
#endif
27
while
(
p
!=
NULL
)
28
{
29
#ifndef HAVE_ZERODIVISORS
30
n_InpMult__T(
pGetCoeff
(
p
), n, r->cf);
31
pIter
(
p
);
32
#else
33
number tmp = n_Mult__T(n,
pGetCoeff
(
p
), r->cf);
34
if
(!n_IsZero__T(tmp,r->cf))
35
{
36
number nc =
pGetCoeff
(
p
);
37
p_SetCoeff0
(
p
, tmp, r);
38
n_Delete__T
(&nc, r->cf);
39
old =
p
;
40
pIter
(
p
);
41
}
42
else
43
{
44
n_Delete__T
(&tmp, r->cf);
45
if
(old ==
NULL
)
46
{
47
pIter
(
p
);
48
p_LmDelete
(&q, r);
49
}
50
else
51
{
52
p_LmDelete
(&
p
, r);
53
pNext
(old) =
p
;
54
}
55
}
56
#endif
57
}
p_SetCoeff0
#define p_SetCoeff0(p, n, r)
Definition:
monomials.h:64
pAssume
#define pAssume(cond)
Definition:
monomials.h:93
p_Test
#define p_Test(p, r)
Definition:
p_polys.h:155
p_Mult_nn__T
LINKAGE poly p_Mult_nn__T(poly p, const number n, const ring r)
Definition:
p_Mult_nn__T.cc:15
p_LmDelete
static void p_LmDelete(poly p, const ring r)
Definition:
p_polys.h:698
pIter
#define pIter(p)
Definition:
monomials.h:41
n_Delete__T
#define n_Delete__T(n, r)
Definition:
p_polys.cc:4776
NULL
#define NULL
Definition:
omList.c:9
p
int p
Definition:
cfModGcd.cc:4019
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:48
LINKAGE
#define LINKAGE
Definition:
mod2.h:137
pNext
#define pNext(p)
Definition:
monomials.h:40
Generated on Fri Jan 10 2020 08:17:41 for My Project by
doxygen 1.8.16
for
Singular debian-1:4.1.1-p2+ds-4