fieker-DuValspielwiese
Last change
on this file since 171950 was
35aab3,
checked in by Hans Schönemann <hannes@…>, 21 years ago
|
This commit was generated by cvs2svn to compensate for changes in r6879,
which included commits to RCS files with non-trunk default branches.
git-svn-id: file:///usr/local/Singular/svn/trunk@6880 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
792 bytes
|
Rev | Line | |
---|
[35aab3] | 1 | /**************************************** |
---|
| 2 | * Computer Algebra System SINGULAR * |
---|
| 3 | ****************************************/ |
---|
| 4 | /* $Id: prCopyTemplate.cc,v 1.1.1.1 2003-10-06 12:16:02 Singular Exp $ */ |
---|
| 5 | /* |
---|
| 6 | * ABSTRACT - templates for pr routines |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | static poly PR_NAME |
---|
| 11 | (poly &src, ring r_src, ring r_dest) |
---|
| 12 | { |
---|
| 13 | spolyrec dest_s; |
---|
| 14 | poly dest = &dest_s; |
---|
| 15 | poly tmp; |
---|
| 16 | PR_INIT_EVECTOR_COPY(r_src, r_dest); |
---|
| 17 | |
---|
| 18 | while (src != NULL) |
---|
| 19 | { |
---|
| 20 | pNext(dest) = (poly) PR_ALLOC_MONOM(r_dest); |
---|
| 21 | pIter(dest); |
---|
| 22 | pSetCoeff0(dest, PR_NCOPY(pGetCoeff(src), r_src)); |
---|
| 23 | PR_CPY_EVECTOR(dest, r_dest, src, r_src); |
---|
| 24 | tmp = pNext(src); |
---|
| 25 | PR_DELETE_MONOM(src, r_src); |
---|
| 26 | src = tmp; |
---|
| 27 | } |
---|
| 28 | pNext(dest) = NULL; |
---|
| 29 | dest = pNext(&dest_s); |
---|
| 30 | PR_SORT_POLY(dest, r_dest, r_src); |
---|
| 31 | p_Test(dest, r_dest); |
---|
| 32 | return dest; |
---|
| 33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.