source: git/Singular/matpol.h @ 32df82

spielwiese
Last change on this file since 32df82 was 32df82, checked in by Hans Schönemann <hannes@…>, 27 years ago
* hannes: removed rcsid and Log: entries, added assignment module=poly corected type conversion int->module git-svn-id: file:///usr/local/Singular/svn/trunk@128 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.9 KB
Line 
1#ifndef MATPOL_H
2#define MATPOL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/*
7* ABSTRACT
8*/
9#include "structs.h"
10
11class ip_smatrix
12{
13  public:
14
15  poly *m;
16  long rank;
17  int nrows;
18  int ncols;
19
20  inline int& rows() { return nrows; }
21  inline int& cols() { return ncols; }
22
23  #define MATROWS(i) ((i)->nrows)
24  #define MATCOLS(i) ((i)->ncols)
25  #define MATELEM(mat,i,j) ((mat)->m)[MATCOLS((mat)) * ((i)-1) + (j)-1]
26};
27
28#ifdef MDEBUG
29matrix mpDBNew(int r, int c, char *f, int l);
30#define mpNew(A,B) mpDBNew(A,B,__FILE__,__LINE__)
31#else
32matrix mpNew(int r, int c);
33#endif
34matrix mpCopy (matrix a);
35matrix mpInitP(int r, int c, poly p);
36matrix mpInitI(int r, int c, int v);
37matrix mpMultI(matrix a, int f);
38matrix mpMultP(matrix a, poly p);
39matrix mpAdd(matrix a, matrix b);
40matrix mpSub(matrix a, matrix b);
41matrix mpMult(matrix a, matrix b);
42matrix mpTransp(matrix a);
43BOOLEAN mpEqual(matrix a, matrix b);
44poly mpTrace ( matrix a);
45poly TraceOfProd ( matrix a, matrix b, int n);
46
47matrix mpBareiss (matrix a, BOOLEAN diagonal);
48poly mpDet (matrix m);
49matrix mpWedge(matrix a, int ar);
50BOOLEAN mpJacobi(leftv res,leftv a);
51BOOLEAN mpKoszul(leftv res,leftv b/*in*/, leftv c/*ip*/, leftv id=NULL);
52
53//matrix mpHomogen(matrix a, int v);
54
55void   mpMonomials(matrix c, int r, int var, matrix m);
56matrix mpCoeffs(ideal I, int var);
57/* corresponds to Maple's coeffs:
58*var has to be the number of a variable
59*/
60
61matrix mpCoeffProc (poly f, poly vars);
62/* corresponds to Macauley's coef:
63the exponent vector of vars has to contain the variables, eg 'xy';
64then the poly f is searched for monomials in x and y, these monimials
65are written to the first row of the matrix co.
66the second row of co contains the respective factors in f.
67Thus f = sum co[1,i]*co[2,i], i = 1..cols, rows equals 2. */
68void mpCoef2(poly v, poly vars, matrix *c, matrix *m);
69
70#endif
Note: See TracBrowser for help on using the repository browser.