1 | #ifndef MATPOL_H |
---|
2 | #define MATPOL_H |
---|
3 | /**************************************** |
---|
4 | * Computer Algebra System SINGULAR * |
---|
5 | ****************************************/ |
---|
6 | /* $Id: matpol.h,v 1.5 1997-11-13 09:09:28 siebert Exp $ */ |
---|
7 | /* |
---|
8 | * ABSTRACT |
---|
9 | */ |
---|
10 | #include "structs.h" |
---|
11 | |
---|
12 | class ip_smatrix |
---|
13 | { |
---|
14 | public: |
---|
15 | |
---|
16 | poly *m; |
---|
17 | long rank; |
---|
18 | int nrows; |
---|
19 | int ncols; |
---|
20 | |
---|
21 | inline int& rows() { return nrows; } |
---|
22 | inline int& cols() { return ncols; } |
---|
23 | |
---|
24 | #define MATROWS(i) ((i)->nrows) |
---|
25 | #define MATCOLS(i) ((i)->ncols) |
---|
26 | #define MATELEM(mat,i,j) ((mat)->m)[MATCOLS((mat)) * ((i)-1) + (j)-1] |
---|
27 | }; |
---|
28 | |
---|
29 | #ifdef MDEBUG |
---|
30 | matrix mpDBNew(int r, int c, char *f, int l); |
---|
31 | #define mpNew(A,B) mpDBNew(A,B,__FILE__,__LINE__) |
---|
32 | #else |
---|
33 | matrix mpNew(int r, int c); |
---|
34 | #endif |
---|
35 | matrix mpCopy (matrix a); |
---|
36 | matrix mpInitP(int r, int c, poly p); |
---|
37 | matrix mpInitI(int r, int c, int v); |
---|
38 | matrix mpMultI(matrix a, int f); |
---|
39 | matrix mpMultP(matrix a, poly p); |
---|
40 | matrix mpAdd(matrix a, matrix b); |
---|
41 | matrix mpSub(matrix a, matrix b); |
---|
42 | matrix mpMult(matrix a, matrix b); |
---|
43 | matrix mpTransp(matrix a); |
---|
44 | BOOLEAN mpEqual(matrix a, matrix b); |
---|
45 | poly mpTrace ( matrix a); |
---|
46 | poly TraceOfProd ( matrix a, matrix b, int n); |
---|
47 | |
---|
48 | matrix mpBareiss (matrix a, BOOLEAN diagonal); |
---|
49 | matrix mpOneStepBareiss (matrix a, poly *H, int *r, int *c); |
---|
50 | poly mpDet (matrix m); |
---|
51 | matrix mpWedge(matrix a, int ar); |
---|
52 | BOOLEAN mpJacobi(leftv res,leftv a); |
---|
53 | BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL); |
---|
54 | |
---|
55 | //matrix mpHomogen(matrix a, int v); |
---|
56 | |
---|
57 | void mpMonomials(matrix c, int r, int var, matrix m); |
---|
58 | matrix mpCoeffs(ideal I, int var); |
---|
59 | /* corresponds to Maple's coeffs: |
---|
60 | *var has to be the number of a variable |
---|
61 | */ |
---|
62 | |
---|
63 | matrix mpCoeffProc (poly f, poly vars); |
---|
64 | /* corresponds to Macauley's coef: |
---|
65 | the exponent vector of vars has to contain the variables, eg 'xy'; |
---|
66 | then the poly f is searched for monomials in x and y, these monimials |
---|
67 | are written to the first row of the matrix co. |
---|
68 | the second row of co contains the respective factors in f. |
---|
69 | Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */ |
---|
70 | void mpCoef2(poly v, poly vars, matrix *c, matrix *m); |
---|
71 | |
---|
72 | #endif |
---|