1 | %{ |
---|
2 | /* |
---|
3 | * |
---|
4 | * Test mod fuer modgen |
---|
5 | */ |
---|
6 | |
---|
7 | #include <stdio.h> |
---|
8 | #include "Pcv.h" |
---|
9 | %} |
---|
10 | |
---|
11 | |
---|
12 | // module="pcv"; |
---|
13 | package="pcv"; |
---|
14 | |
---|
15 | version="$Id$"; |
---|
16 | info=" |
---|
17 | LIBRARY: pcv.so CONVERSION BETWEEN POLYS AND COEF VECTORS |
---|
18 | AUTHOR: Mathias Schulze, email: mschulze@mathematik.uni-kl.de |
---|
19 | |
---|
20 | MinDeg(p); min deg of monomials of poly p |
---|
21 | P2CV(l,d0,d1); list of coef vectors from deg d0 to d1 of polys in list l |
---|
22 | CV2P(l,d0,d1); list of polys with coef vectors from deg d0 to d1 in list l |
---|
23 | Dim(d0,d1); number of monomials from deg d0 to d1 |
---|
24 | Basis(d0,d1); list of monomials from deg d0 to d1 |
---|
25 | "; |
---|
26 | |
---|
27 | cxxsource = Pcv.cc; |
---|
28 | |
---|
29 | %procedures |
---|
30 | |
---|
31 | |
---|
32 | int MinDeg(poly p) { |
---|
33 | %declaration; |
---|
34 | %typecheck; |
---|
35 | %return(pcvMinDeg(p)); |
---|
36 | } |
---|
37 | |
---|
38 | list P2CV(list pl,int d0,int d1) { |
---|
39 | %declaration; |
---|
40 | |
---|
41 | /* check if current RingHandle is set */ |
---|
42 | if(currRingHdl == NULL) |
---|
43 | { |
---|
44 | WerrorS("no ring active"); |
---|
45 | return TRUE; |
---|
46 | } |
---|
47 | |
---|
48 | %typecheck; |
---|
49 | %return(pcvP2CV(pl, d0, d1)); |
---|
50 | } |
---|
51 | |
---|
52 | list CV2P(list pl,int d0,int d1) |
---|
53 | { |
---|
54 | %declaration; |
---|
55 | |
---|
56 | /* check if current RingHandle is set */ |
---|
57 | if(currRingHdl == NULL) |
---|
58 | { |
---|
59 | WerrorS("no ring active"); |
---|
60 | return TRUE; |
---|
61 | } |
---|
62 | |
---|
63 | %typecheck; |
---|
64 | %return(pcvCV2P(pl, d0, d1)); |
---|
65 | } |
---|
66 | |
---|
67 | int Dim(int d0,int d1) |
---|
68 | { |
---|
69 | %declaration; |
---|
70 | |
---|
71 | /* check if current RingHandle is set */ |
---|
72 | if(currRingHdl == NULL) |
---|
73 | { |
---|
74 | WerrorS("no ring active"); |
---|
75 | return TRUE; |
---|
76 | } |
---|
77 | |
---|
78 | %typecheck; |
---|
79 | %return(pcvDim); |
---|
80 | } |
---|
81 | |
---|
82 | list Basis(int d0,int d1) |
---|
83 | { |
---|
84 | %declaration; |
---|
85 | |
---|
86 | /* check if current RingHandle is set */ |
---|
87 | if(currRingHdl == NULL) |
---|
88 | { |
---|
89 | WerrorS("no ring active"); |
---|
90 | return TRUE; |
---|
91 | } |
---|
92 | |
---|
93 | %typecheck; |
---|
94 | %return(pcvBasis); |
---|
95 | } |
---|
96 | |
---|
97 | // %% |
---|
98 | |
---|