libpolys
polys
templates
p_Copy__T.cc
Go to the documentation of this file.
1
/****************************************
2
* Computer Algebra System SINGULAR *
3
****************************************/
4
/***************************************************************
5
* File: p_Copy__Template.cc
6
* Purpose: template for p_Copy__T
7
* Author: obachman (Olaf Bachmann)
8
* Created: 8/00
9
*******************************************************************/
10
11
LINKAGE
poly
p_Copy__T
(
poly
s_p,
const
ring
r
)
12
{
13
// let's not do tests here -- but instead allow
14
// to be sloppy
15
spolyrec
dp;
16
poly
d_p = &dp;
17
omBin
bin =
r
->PolyBin;
18
poly
h
;
19
20
DECLARE_LENGTH(
const
unsigned
long
length =
r
->ExpL_Size);
21
22
while
(s_p !=
NULL
)
23
{
24
p_AllocBin
(
pNext
(d_p), bin,
r
);
25
pIter
(d_p);
26
pSetCoeff0
(d_p, n_Copy__T(
pGetCoeff
(s_p),
r
->cf));
27
// it is better to iter here,
28
// for MemCopy advances goes from low to high addresses
29
h
= s_p;
30
s_p =
pNext
(s_p);
31
p_MemCopy__T(d_p->exp,
h
->exp, length);
32
}
33
pNext
(d_p) =
NULL
;
34
35
return
dp.
next
;
36
}
37
p_Copy__T
LINKAGE poly p_Copy__T(poly s_p, const ring r)
Definition:
p_Copy__T.cc:11
omBin
omBin_t * omBin
Definition:
omStructs.h:12
LINKAGE
#define LINKAGE
Definition:
mod2.h:142
p_AllocBin
#define p_AllocBin(p, bin, r)
Definition:
monomials.h:256
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
pIter
#define pIter(p)
Definition:
monomials.h:44
r
const ring r
Definition:
syzextra.cc:208
NULL
#define NULL
Definition:
omList.c:10
spolyrec
Definition:
monomials.h:29
pNext
#define pNext(p)
Definition:
monomials.h:43
pSetCoeff0
#define pSetCoeff0(p, n)
Definition:
monomials.h:67
poly
polyrec * poly
Definition:
hilb.h:10
h
static Poly * h
Definition:
janet.cc:978
spolyrec::next
poly next
Definition:
monomials.h:31
Generated on Fri Feb 16 2018 01:42:52 by
doxygen 1.8.14
for
Singular UNKNOWN_GIT_VERSION