My Project
debian-1:4.1.1-p2+ds-4build2
libpolys
polys
templates
p_ShallowCopyDelete__T.cc
Go to the documentation of this file.
1
/****************************************
2
* Computer Algebra System SINGULAR *
3
****************************************/
4
/***************************************************************
5
* File: p_ShallowCopyDelete__Template.cc
6
* Purpose: template for p_ShallowCopyDelete
7
* Author: obachman (Olaf Bachmann)
8
* Created: 8/00
9
*******************************************************************/
10
11
/***************************************************************
12
*
13
* Destroys: p
14
* Assumes: Monoms of p are from
15
* Returns:
16
***************************************************************/
17
LINKAGE
poly
p_ShallowCopyDelete__T
(poly s_p,
const
ring r,
omBin
d_bin)
18
{
19
spolyrec
dp;
20
poly d_p = &dp;
21
poly
h
;
22
23
DECLARE_LENGTH(
const
unsigned
long
length
= r->ExpL_Size);
24
25
while
(s_p !=
NULL
)
26
{
27
p_AllocBin
(d_p->next, d_bin, r);
28
pIter
(d_p);
29
pSetCoeff0
(d_p,
pGetCoeff
(s_p));
30
h
= s_p;
31
s_p =
pNext
(s_p);
32
p_MemCopy__T(d_p->exp,
h
->exp,
length
);
33
p_FreeBinAddr
(
h
, r);
34
}
35
pNext
(d_p) =
NULL
;
36
return
dp.
next
;
37
}
38
length
static BOOLEAN length(leftv result, leftv arg)
Definition:
interval.cc:267
spolyrec::next
poly next
Definition:
monomials.h:31
p_ShallowCopyDelete__T
LINKAGE poly p_ShallowCopyDelete__T(poly s_p, const ring r, omBin d_bin)
Definition:
p_ShallowCopyDelete__T.cc:17
h
static Poly * h
Definition:
janet.cc:972
pIter
#define pIter(p)
Definition:
monomials.h:44
spolyrec
Definition:
monomials.h:29
p_FreeBinAddr
#define p_FreeBinAddr(p, r)
Definition:
monomials.h:262
omBin
omBin_t * omBin
Definition:
omStructs.h:12
pSetCoeff0
#define pSetCoeff0(p, n)
Definition:
monomials.h:66
NULL
#define NULL
Definition:
omList.c:10
p_AllocBin
#define p_AllocBin(p, bin, r)
Definition:
monomials.h:255
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:51
LINKAGE
#define LINKAGE
Definition:
mod2.h:141
pNext
#define pNext(p)
Definition:
monomials.h:43
Generated on Tue Mar 24 2020 14:10:46 for My Project by
doxygen 1.8.17
for
Singular debian-1:4.1.1-p2+ds-4build2