spielwiese
Last change
on this file since 35aab3 was
35aab3,
checked in by Hans Schönemann <hannes@…>, 20 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:
1.1 KB
|
Line | |
---|
1 | /**************************************** |
---|
2 | * Computer Algebra System SINGULAR * |
---|
3 | ****************************************/ |
---|
4 | /*************************************************************** |
---|
5 | * File: pp_Mult_nn__Template.cc |
---|
6 | * Purpose: template for pp_Mult_nn |
---|
7 | * Author: obachman (Olaf Bachmann) |
---|
8 | * Created: 8/00 |
---|
9 | * Version: $Id: pp_Mult_nn__T.cc,v 1.1.1.1 2003-10-06 12:16:02 Singular Exp $ |
---|
10 | *******************************************************************/ |
---|
11 | |
---|
12 | /*************************************************************** |
---|
13 | * |
---|
14 | * Returns: p*n |
---|
15 | * Const: p, n |
---|
16 | * |
---|
17 | ***************************************************************/ |
---|
18 | LINKAGE poly pp_Mult_nn(poly p, const number n, const ring r) |
---|
19 | { |
---|
20 | pAssume(!n_IsZero(n,r)); |
---|
21 | p_Test(p, r); |
---|
22 | if (p == NULL) return NULL; |
---|
23 | spolyrec rp; |
---|
24 | poly q = &rp; |
---|
25 | omBin bin = r->PolyBin; |
---|
26 | DECLARE_LENGTH(const unsigned long length = r->ExpL_Size); |
---|
27 | |
---|
28 | do |
---|
29 | { |
---|
30 | p_AllocBin(pNext(q), bin, r); |
---|
31 | q = pNext(q); |
---|
32 | number nc = pGetCoeff(p); |
---|
33 | pSetCoeff0(q, n_Mult(n, nc, r)); |
---|
34 | p_MemCopy(q->exp, p->exp, length); |
---|
35 | pIter(p); |
---|
36 | } |
---|
37 | while (p != NULL); |
---|
38 | pNext(q) = NULL; |
---|
39 | |
---|
40 | p_Test(rp.next, r); |
---|
41 | return rp.next; |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.